# HG changeset patch # User Ben Wing # Date 1267857853 21600 # Node ID c113da3e2f6749f20e38325531968a0c456be6f0 # Parent d76a51b29d913a7cc31d2dc7600717628dec63f6 add a comment about where FRAME_PIXWIDTH/FRAME_PIXHEIGHT is set -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-03-06 Ben Wing * frame.c (change_frame_size_1): Add a comment about where FRAME_PIXWIDTH/FRAME_PIXHEIGHT is set. diff -r d76a51b29d91 -r c113da3e2f67 src/ChangeLog --- a/src/ChangeLog Sat Mar 06 00:01:04 2010 -0600 +++ b/src/ChangeLog Sat Mar 06 00:44:13 2010 -0600 @@ -1,3 +1,8 @@ +2010-03-06 Ben Wing + + * frame.c (change_frame_size_1): + Add a comment about where FRAME_PIXWIDTH/FRAME_PIXHEIGHT is set. + 2010-03-05 Ben Wing * frame.c: diff -r d76a51b29d91 -r c113da3e2f67 src/frame.c --- a/src/frame.c Sat Mar 06 00:01:04 2010 -0600 +++ b/src/frame.c Sat Mar 06 00:44:13 2010 -0600 @@ -3696,6 +3696,22 @@ /* Frame has just one top-level window. */ set_window_pixheight (FRAME_ROOT_WINDOW (f), paned_pixheight, 0); + /* Set the value of FRAME_WIDTH/FRAME_HEIGHT and + FRAME_CHARWIDTH/FRAME_CHARHEIGHT. + + Question: Where is FRAME_PIXWIDTH/FRAME_PIXHEIGHT set? + Answer: In the device-specific code, as a result of a callback from + the window system indicating that the frame has changed size. + This happens: + + (1) in the WM_SIZE processing in event-msw.c + (2) in update_various_frame_slots() called from EmacsFrameResize() + (called from Xt when the frame is resized) in EmacsFrame.c for X + (3) in resize_event_cb() in frame-gtk.c + (4) For TTY's, there is no such callback, so we have to set it + ourselves. + */ + FRAME_HEIGHT (f) = newheight; if (FRAME_TTY_P (f)) f->pixheight = newheight;