diff 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
line wrap: on
line diff
--- 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;