diff --git a/src/gtkutil.c b/src/gtkutil.c index e374bdbe03..9fcaeed097 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) = pixelheight + FRAME_TOOLBAR_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f); int totalwidth = pixelwidth + FRAME_TOOLBAR_WIDTH (f); bool was_visible = false; + bool hide_child_frame = false; if (FRAME_PIXEL_HEIGHT (f) == 0) return; @@ -996,26 +997,33 @@ xg_frame_set_char_size (struct frame *f, int width, int height) gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), totalwidth, gheight); } - else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f) - && EQ (x_gtk_resize_child_frames, Qhide)) + else if (FRAME_PARENT_FRAME (f) && FRAME_VISIBLE_P (f)) { was_visible = true; + hide_child_frame = EQ (x_gtk_resize_child_frames, Qhide); if (totalwidth != gwidth || totalheight != gheight) { frame_size_history_add (f, Qxg_frame_set_char_size_4, width, height, list2i (totalwidth, totalheight)); - block_input (); - gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); - unblock_input (); + + if (hide_child_frame) + { + block_input (); + gtk_widget_hide (FRAME_GTK_OUTER_WIDGET (f)); + unblock_input (); + } gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), totalwidth, totalheight); - block_input (); - gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); - unblock_input (); + if (hide_child_frame) + { + block_input (); + gtk_widget_show_all (FRAME_GTK_OUTER_WIDGET (f)); + unblock_input (); + } fullscreen = Qnil; }