aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2009-07-02 07:48:23 +0000
committerJan Djärv2009-07-02 07:48:23 +0000
commit574c8efad03b39267b246df3d168112d469f4e67 (patch)
treee7a876557e6ac06f3303c5e345f6f272ae7c37f7 /src
parentaf0403e0d4126d5920f4fe4d000edbc2fae689fc (diff)
downloademacs-574c8efad03b39267b246df3d168112d469f4e67.tar.gz
emacs-574c8efad03b39267b246df3d168112d469f4e67.zip
(xg_frame_set_char_size): Do not set pixel width/height here or
call change_frame_size.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/gtkutil.c31
2 files changed, 13 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e3ab9ac8868..7c266448492 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-07-02 Jan Djärv <jan.h.d@swipnet.se>
2
3 * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height here or
4 call change_frame_size.
5
12009-07-01 Jan Djärv <jan.h.d@swipnet.se> 62009-07-01 Jan Djärv <jan.h.d@swipnet.se>
2 7
3 * xterm.h (struct x_display_info): Add Xatom_net_wm_state_sticky 8 * xterm.h (struct x_display_info): Add Xatom_net_wm_state_sticky
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 9a11605a417..4ce15ae8cc3 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -625,7 +625,6 @@ xg_set_geometry (f)
625 f->left_pos, f->top_pos); 625 f->left_pos, f->top_pos);
626} 626}
627 627
628
629/* Function to handle resize of our frame. As we have a Gtk+ tool bar 628/* Function to handle resize of our frame. As we have a Gtk+ tool bar
630 and a Gtk+ menu bar, we get resize events for the edit part of the 629 and a Gtk+ menu bar, we get resize events for the edit part of the
631 frame only. We let Gtk+ deal with the Gtk+ parts. 630 frame only. We let Gtk+ deal with the Gtk+ parts.
@@ -656,7 +655,6 @@ xg_frame_resized (f, pixelwidth, pixelheight)
656} 655}
657 656
658/* Resize the outer window of frame F after chainging the height. 657/* Resize the outer window of frame F after chainging the height.
659 This happend when the menu bar or the tool bar is added or removed.
660 COLUMNS/ROWS is the size the edit area shall have after the resize. */ 658 COLUMNS/ROWS is the size the edit area shall have after the resize. */
661 659
662void 660void
@@ -692,28 +690,15 @@ xg_frame_set_char_size (f, cols, rows)
692 pixelwidth, pixelheight); 690 pixelwidth, pixelheight);
693 x_wm_set_size_hint (f, 0, 0); 691 x_wm_set_size_hint (f, 0, 0);
694 692
695 /* Now, strictly speaking, we can't be sure that this is accurate,
696 but the window manager will get around to dealing with the size
697 change request eventually, and we'll hear how it went when the
698 ConfigureNotify event gets here.
699
700 We could just not bother storing any of this information here,
701 and let the ConfigureNotify event set everything up, but that
702 might be kind of confusing to the Lisp code, since size changes
703 wouldn't be reported in the frame parameters until some random
704 point in the future when the ConfigureNotify event arrives.
705
706 We pass 1 for DELAY since we can't run Lisp code inside of
707 a BLOCK_INPUT. */
708 change_frame_size (f, rows, cols, 0, 1, 0);
709 FRAME_PIXEL_WIDTH (f) = pixelwidth;
710 FRAME_PIXEL_HEIGHT (f) = pixelheight;
711
712 /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to
713 receive in the ConfigureNotify event; if we get what we asked
714 for, then the event won't cause the screen to become garbaged, so
715 we have to make sure to do it here. */
716 SET_FRAME_GARBAGED (f); 693 SET_FRAME_GARBAGED (f);
694
695 /* We can not call change_frame_size here, we can not set pixel
696 width/height either. The window manager may override our resize
697 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
699 possible. */
700 gdk_window_process_all_updates ();
701 x_sync (f);
717} 702}
718 703
719/* Handle height changes (i.e. add/remove menu/toolbar). 704/* Handle height changes (i.e. add/remove menu/toolbar).