diff src/gtkutil.c @ 103687:b14ad5a1ef66

(xg_frame_set_char_size): Do not set pixel width/height here or call change_frame_size. Just call flush_and_sync. (flush_and_sync): Reintroduced.
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 02 Jul 2009 08:20:56 +0000
parents 49c52a6beed8
children 197ba1273776
line wrap: on
line diff
--- a/src/gtkutil.c	Thu Jul 02 07:48:23 2009 +0000
+++ b/src/gtkutil.c	Thu Jul 02 08:20:56 2009 +0000
@@ -636,6 +636,7 @@
      FRAME_PTR f;
      int pixelwidth, pixelheight;
 {
+  fprintf(stderr, "%s: %d/%d\n", __func__, pixelwidth, pixelheight);
   int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight);
   int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth);
 
@@ -654,6 +655,20 @@
     }
 }
 
+static void
+flush_and_sync (f)
+     FRAME_PTR f;
+{
+  gdk_window_process_all_updates ();
+  x_sync (f);
+  while (gtk_events_pending ())
+    {
+      gtk_main_iteration ();
+      gdk_window_process_all_updates ();
+      x_sync (f);
+    }
+}
+
 /* Resize the outer window of frame F after chainging the height.
    COLUMNS/ROWS is the size the edit area shall have after the resize.  */
 
@@ -697,8 +712,7 @@
      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);
+  flush_and_sync (f);
 }
 
 /* Handle height changes (i.e. add/remove menu/toolbar).