diff options
| author | Jan Djärv | 2009-07-02 08:20:56 +0000 |
|---|---|---|
| committer | Jan Djärv | 2009-07-02 08:20:56 +0000 |
| commit | 835bdaa704ce1f388d3dab45006b3dc06e0ef199 (patch) | |
| tree | 252580c20ed9bc5835dd4e2deb1044f784813797 /src | |
| parent | 574c8efad03b39267b246df3d168112d469f4e67 (diff) | |
| download | emacs-835bdaa704ce1f388d3dab45006b3dc06e0ef199.tar.gz emacs-835bdaa704ce1f388d3dab45006b3dc06e0ef199.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/gtkutil.c | 18 |
2 files changed, 19 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7c266448492..673c716753d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | 2009-07-02 Jan Djärv <jan.h.d@swipnet.se> | 1 | 2009-07-02 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 2 | ||
| 3 | * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height here or | 3 | * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height |
| 4 | call change_frame_size. | 4 | here or call change_frame_size. Just call flush_and_sync. |
| 5 | (flush_and_sync): Reintroduced. | ||
| 5 | 6 | ||
| 6 | 2009-07-01 Jan Djärv <jan.h.d@swipnet.se> | 7 | 2009-07-01 Jan Djärv <jan.h.d@swipnet.se> |
| 7 | 8 | ||
diff --git a/src/gtkutil.c b/src/gtkutil.c index 4ce15ae8cc3..2bca0deac2c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -636,6 +636,7 @@ xg_frame_resized (f, pixelwidth, pixelheight) | |||
| 636 | FRAME_PTR f; | 636 | FRAME_PTR f; |
| 637 | int pixelwidth, pixelheight; | 637 | int pixelwidth, pixelheight; |
| 638 | { | 638 | { |
| 639 | fprintf(stderr, "%s: %d/%d\n", __func__, pixelwidth, pixelheight); | ||
| 639 | int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight); | 640 | int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, pixelheight); |
| 640 | int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth); | 641 | int columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, pixelwidth); |
| 641 | 642 | ||
| @@ -654,6 +655,20 @@ xg_frame_resized (f, pixelwidth, pixelheight) | |||
| 654 | } | 655 | } |
| 655 | } | 656 | } |
| 656 | 657 | ||
| 658 | static void | ||
| 659 | flush_and_sync (f) | ||
| 660 | FRAME_PTR f; | ||
| 661 | { | ||
| 662 | gdk_window_process_all_updates (); | ||
| 663 | x_sync (f); | ||
| 664 | while (gtk_events_pending ()) | ||
| 665 | { | ||
| 666 | gtk_main_iteration (); | ||
| 667 | gdk_window_process_all_updates (); | ||
| 668 | x_sync (f); | ||
| 669 | } | ||
| 670 | } | ||
| 671 | |||
| 657 | /* Resize the outer window of frame F after chainging the height. | 672 | /* Resize the outer window of frame F after chainging the height. |
| 658 | COLUMNS/ROWS is the size the edit area shall have after the resize. */ | 673 | COLUMNS/ROWS is the size the edit area shall have after the resize. */ |
| 659 | 674 | ||
| @@ -697,8 +712,7 @@ xg_frame_set_char_size (f, cols, rows) | |||
| 697 | request, XMonad does this all the time. The best we can do | 712 | request, XMonad does this all the time. The best we can do |
| 698 | is try to sync, so lisp code sees the updated size as fast as | 713 | is try to sync, so lisp code sees the updated size as fast as |
| 699 | possible. */ | 714 | possible. */ |
| 700 | gdk_window_process_all_updates (); | 715 | flush_and_sync (f); |
| 701 | x_sync (f); | ||
| 702 | } | 716 | } |
| 703 | 717 | ||
| 704 | /* Handle height changes (i.e. add/remove menu/toolbar). | 718 | /* Handle height changes (i.e. add/remove menu/toolbar). |