emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src ChangeLog gtkutil.c


From: Jan Djärv
Subject: [Emacs-diffs] emacs/src ChangeLog gtkutil.c
Date: Thu, 02 Jul 2009 07:48:25 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Jan Djärv <jhd> 09/07/02 07:48:25

Modified files:
        src            : ChangeLog gtkutil.c 

Log message:
        (xg_frame_set_char_size): Do not set pixel width/height here or
        call change_frame_size.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7622&r2=1.7623
http://cvs.savannah.gnu.org/viewcvs/emacs/src/gtkutil.c?cvsroot=emacs&r1=1.153&r2=1.154

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7622
retrieving revision 1.7623
diff -u -b -r1.7622 -r1.7623
--- ChangeLog   1 Jul 2009 16:58:05 -0000       1.7622
+++ ChangeLog   2 Jul 2009 07:48:23 -0000       1.7623
@@ -1,3 +1,8 @@
+2009-07-02  Jan Djärv  <address@hidden>
+
+       * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height 
here or
+       call change_frame_size.
+
 2009-07-01  Jan Djärv  <address@hidden>
 
        * xterm.h (struct x_display_info): Add Xatom_net_wm_state_sticky

Index: gtkutil.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/gtkutil.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -b -r1.153 -r1.154
--- gtkutil.c   1 Jul 2009 15:53:00 -0000       1.153
+++ gtkutil.c   2 Jul 2009 07:48:25 -0000       1.154
@@ -625,7 +625,6 @@
                      f->left_pos, f->top_pos);
 }
 
-
 /* Function to handle resize of our frame.  As we have a Gtk+ tool bar
    and a Gtk+ menu bar, we get resize events for the edit part of the
    frame only.  We let Gtk+ deal with the Gtk+ parts.
@@ -656,7 +655,6 @@
 }
 
 /* Resize the outer window of frame F after chainging the height.
-   This happend when the menu bar or the tool bar is added or removed.
    COLUMNS/ROWS is the size the edit area shall have after the resize.  */
 
 void
@@ -692,28 +690,15 @@
                      pixelwidth, pixelheight);
   x_wm_set_size_hint (f, 0, 0);
 
-  /* Now, strictly speaking, we can't be sure that this is accurate,
-     but the window manager will get around to dealing with the size
-     change request eventually, and we'll hear how it went when the
-     ConfigureNotify event gets here.
-
-     We could just not bother storing any of this information here,
-     and let the ConfigureNotify event set everything up, but that
-     might be kind of confusing to the Lisp code, since size changes
-     wouldn't be reported in the frame parameters until some random
-     point in the future when the ConfigureNotify event arrives.
-
-     We pass 1 for DELAY since we can't run Lisp code inside of
-     a BLOCK_INPUT.  */
-  change_frame_size (f, rows, cols, 0, 1, 0);
-  FRAME_PIXEL_WIDTH (f) = pixelwidth;
-  FRAME_PIXEL_HEIGHT (f) = pixelheight;
-
-  /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to
-     receive in the ConfigureNotify event; if we get what we asked
-     for, then the event won't cause the screen to become garbaged, so
-     we have to make sure to do it here.  */
   SET_FRAME_GARBAGED (f);
+
+  /* We can not call change_frame_size here, we can not set pixel 
+     width/height either.  The window manager may override our resize
+     request, XMonad does this all the time.  The best we can do
+     is try to sync, so lisp code sees the updated size as fast as
+     possible.  */
+  gdk_window_process_all_updates ();
+  x_sync (f);
 }
 
 /* Handle height changes (i.e. add/remove menu/toolbar).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]