Mercurial > emacs
comparison src/gtkutil.c @ 103198:f63bce93c7a1
* gtkutil.c (xg_frame_set_char_size): Set frame pixel width/height to
what we expect to get in the next ConfigureNotify event.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Mon, 11 May 2009 06:42:45 +0000 |
parents | 15bf0d8a6099 |
children | 340c701162a6 |
comparison
equal
deleted
inserted
replaced
103197:0c6730c52151 | 103198:f63bce93c7a1 |
---|---|
734 It interferes too much, when for example adding or removing the | 734 It interferes too much, when for example adding or removing the |
735 menu/tool bar. */ | 735 menu/tool bar. */ |
736 x_wm_size_hint_off (f); | 736 x_wm_size_hint_off (f); |
737 gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 737 gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
738 pixelwidth, pixelheight); | 738 pixelwidth, pixelheight); |
739 | |
740 /* Now, strictly speaking, we can't be sure that this is accurate, | |
741 but the window manager will get around to dealing with the size | |
742 change request eventually, and we'll hear how it went when the | |
743 ConfigureNotify event gets here. | |
744 | |
745 We could just not bother storing any of this information here, | |
746 and let the ConfigureNotify event set everything up, but that | |
747 might be kind of confusing to the Lisp code, since size changes | |
748 wouldn't be reported in the frame parameters until some random | |
749 point in the future when the ConfigureNotify event arrives. | |
750 | |
751 We pass 1 for DELAY since we can't run Lisp code inside of | |
752 a BLOCK_INPUT. */ | |
753 change_frame_size (f, rows, cols, 0, 1, 0); | |
754 FRAME_PIXEL_WIDTH (f) = pixelwidth; | |
755 FRAME_PIXEL_HEIGHT (f) = pixelheight; | |
756 | |
757 /* We've set {FRAME,PIXEL}_{WIDTH,HEIGHT} to the values we hope to | |
758 receive in the ConfigureNotify event; if we get what we asked | |
759 for, then the event won't cause the screen to become garbaged, so | |
760 we have to make sure to do it here. */ | |
761 SET_FRAME_GARBAGED (f); | |
739 flush_and_sync (f); | 762 flush_and_sync (f); |
740 x_wm_set_size_hint (f, 0, 0); | 763 x_wm_set_size_hint (f, 0, 0); |
741 } | 764 } |
742 | 765 |
743 /* Convert an X Window WSESC on display DPY to its corresponding GtkWidget. | 766 /* Convert an X Window WSESC on display DPY to its corresponding GtkWidget. |