diff options
| -rw-r--r-- | src/gtkutil.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index e374bdbe037..466cb42c7ee 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -954,6 +954,7 @@ xg_frame_set_char_size (struct frame *f, int width, int height) | |||
| 954 | = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); | 954 | = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); |
| 955 | int totalwidth = pixelwidth + FRAME_TOOLBAR_WIDTH (f); | 955 | int totalwidth = pixelwidth + FRAME_TOOLBAR_WIDTH (f); |
| 956 | bool was_visible = false; | 956 | bool was_visible = false; |
| 957 | bool hide_child_frame; | ||
| 957 | 958 | ||
| 958 | if (FRAME_PIXEL_HEIGHT (f) == 0) | 959 | if (FRAME_PIXEL_HEIGHT (f) == 0) |
| 959 | return; | 960 | return; |
| @@ -996,26 +997,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height) | |||
| 996 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 997 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| 997 | totalwidth, gheight); | 998 | totalwidth, gheight); |
| 998 | } | 999 | } |
| 999 | else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f) | 1000 | else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f)) |
| 1000 | && EQ (x_gtk_resize_child_frames, Qhide)) | ||
| 1001 | { | 1001 | { |
| 1002 | was_visible = true; | 1002 | was_visible = true; |
| 1003 | hide_child_frame = EQ (x_gtk_resize_child_frames, Qhide); | ||
| 1003 | 1004 | ||
| 1004 | if (totalwidth != gwidth || totalheight != gheight) | 1005 | if (totalwidth != gwidth || totalheight != gheight) |
| 1005 | { | 1006 | { |
| 1006 | frame_size_history_add | 1007 | frame_size_history_add |
| 1007 | (f, Qxg_frame_set_char_size_4, width, height, | 1008 | (f, Qxg_frame_set_char_size_4, width, height, |
| 1008 | list2i (totalwidth, totalheight)); | 1009 | list2i (totalwidth, totalheight)); |
| 1009 | block_input (); | 1010 | |
| 1010 | gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); | 1011 | if (hide_child_frame) |
| 1011 | unblock_input (); | 1012 | { |
| 1013 | block_input (); | ||
| 1014 | gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); | ||
| 1015 | unblock_input (); | ||
| 1016 | } | ||
| 1012 | 1017 | ||
| 1013 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), | 1018 | gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), |
| 1014 | totalwidth, totalheight); | 1019 | totalwidth, totalheight); |
| 1015 | 1020 | ||
| 1016 | block_input (); | 1021 | if (hide_child_frame) |
| 1017 | gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); | 1022 | { |
| 1018 | unblock_input (); | 1023 | block_input (); |
| 1024 | gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); | ||
| 1025 | unblock_input (); | ||
| 1026 | } | ||
| 1019 | 1027 | ||
| 1020 | fullscreen = Qnil; | 1028 | fullscreen = Qnil; |
| 1021 | } | 1029 | } |