Commit 835bdaa7 authored by Jan Djärv's avatar Jan Djärv
Browse files

(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.
parent 574c8efa
2009-07-02 Jan Djärv <jan.h.d@swipnet.se> 2009-07-02 Jan Djärv <jan.h.d@swipnet.se>
   
* gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height here or * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height
call change_frame_size. here or call change_frame_size. Just call flush_and_sync.
(flush_and_sync): Reintroduced.
   
2009-07-01 Jan Djärv <jan.h.d@swipnet.se> 2009-07-01 Jan Djärv <jan.h.d@swipnet.se>
   
......
...@@ -636,6 +636,7 @@ xg_frame_resized (f, pixelwidth, pixelheight) ...@@ -636,6 +636,7 @@ xg_frame_resized (f, pixelwidth, pixelheight)
FRAME_PTR f; FRAME_PTR f;
int pixelwidth, pixelheight; int pixelwidth, pixelheight;
{ {
fprintf(stderr, "%s: %d/%d\n", __func__, pixelwidth, pixelheight);
int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight); int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight);
int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth); int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth);
...@@ -654,6 +655,20 @@ xg_frame_resized (f, pixelwidth, pixelheight) ...@@ -654,6 +655,20 @@ xg_frame_resized (f, pixelwidth, pixelheight)
} }
} }
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. /* Resize the outer window of frame F after chainging the height.
COLUMNS/ROWS is the size the edit area shall have after the resize. */ COLUMNS/ROWS is the size the edit area shall have after the resize. */
...@@ -697,8 +712,7 @@ xg_frame_set_char_size (f, cols, rows) ...@@ -697,8 +712,7 @@ xg_frame_set_char_size (f, cols, rows)
request, XMonad does this all the time. The best we can do 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 is try to sync, so lisp code sees the updated size as fast as
possible. */ possible. */
gdk_window_process_all_updates (); flush_and_sync (f);
x_sync (f);
} }
/* Handle height changes (i.e. add/remove menu/toolbar). /* Handle height changes (i.e. add/remove menu/toolbar).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment