comparison src/frame.c @ 5109:c113da3e2f67

add a comment about where FRAME_PIXWIDTH/FRAME_PIXHEIGHT is set -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-03-06 Ben Wing <ben@xemacs.org> * frame.c (change_frame_size_1): Add a comment about where FRAME_PIXWIDTH/FRAME_PIXHEIGHT is set.
author Ben Wing <ben@xemacs.org>
date Sat, 06 Mar 2010 00:44:13 -0600
parents d76a51b29d91
children 4f4672e2aa34
comparison
equal deleted inserted replaced
5105:d76a51b29d91 5109:c113da3e2f67
3693 set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0); 3693 set_window_pixheight (FRAME_MINIBUF_WINDOW (f), minibuf_height, 0);
3694 } 3694 }
3695 else 3695 else
3696 /* Frame has just one top-level window. */ 3696 /* Frame has just one top-level window. */
3697 set_window_pixheight (FRAME_ROOT_WINDOW (f), paned_pixheight, 0); 3697 set_window_pixheight (FRAME_ROOT_WINDOW (f), paned_pixheight, 0);
3698
3699 /* Set the value of FRAME_WIDTH/FRAME_HEIGHT and
3700 FRAME_CHARWIDTH/FRAME_CHARHEIGHT.
3701
3702 Question: Where is FRAME_PIXWIDTH/FRAME_PIXHEIGHT set?
3703 Answer: In the device-specific code, as a result of a callback from
3704 the window system indicating that the frame has changed size.
3705 This happens:
3706
3707 (1) in the WM_SIZE processing in event-msw.c
3708 (2) in update_various_frame_slots() called from EmacsFrameResize()
3709 (called from Xt when the frame is resized) in EmacsFrame.c for X
3710 (3) in resize_event_cb() in frame-gtk.c
3711 (4) For TTY's, there is no such callback, so we have to set it
3712 ourselves.
3713 */
3698 3714
3699 FRAME_HEIGHT (f) = newheight; 3715 FRAME_HEIGHT (f) = newheight;
3700 if (FRAME_TTY_P (f)) 3716 if (FRAME_TTY_P (f))
3701 f->pixheight = newheight; 3717 f->pixheight = newheight;
3702 3718