+DEFUN ("set-frame-pixel-height", Fset_frame_pixel_height, 2, 3, 0, /*
+Specify that the frame FRAME is HEIGHT pixels tall.
+Optional third arg non-nil means that redisplay should be HEIGHT pixels tall
+but that the idea of the actual height of the frame should not be changed.
+*/
+ (frame, height, pretend))
+{
+ struct frame *f = decode_frame (frame);
+ int pheight, width;
+ XSETFRAME (frame, f);
+ CHECK_INT (height);
+
+ if (!window_system_pixelated_geometry (frame))
+ {
+ int h = XINT (height);
+ width = FRAME_WIDTH (f);
+ /* Simply using pixel_to_real_char_size here is not good
+ enough since we end up with a total frame size of HEIGHT
+ rather than a displayable height of HEIGHT. */
+ frame_conversion_internal (f, 2, 0, &h, 0, &pheight, 0);
+ }
+ else
+ {
+ width = FRAME_PIXWIDTH (f);
+ pheight = XINT (height);
+ }
+
+ internal_set_frame_size (f, width, pheight, !NILP (pretend));
+ return frame;
+}
+