diff --git a/lisp/frame.el b/lisp/frame.el index 1d5bbf2..c18e4be 100644 --- a/src/frame.c +++ b/src/frame.c @@ -152,10 +152,13 @@ get_frame_param (register struct frame *frame, Lisp_Object prop) bool frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter) { + Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); + return (EQ (frame_inhibit_implied_resize, Qt) || (CONSP (frame_inhibit_implied_resize) && !NILP (Fmemq (parameter, frame_inhibit_implied_resize))) - || !NILP (get_frame_param (f, Qfullscreen)) + || (horizontal && !EQ (fullscreen, Qnil) && !EQ (fullscreen, Qfullheight)) + || (!horizontal && !EQ (fullscreen, Qnil) && !EQ (fullscreen, Qfullwidth)) || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)); } @@ -1009,7 +1012,8 @@ affects all frames on the same terminal device. */) { int width, height; get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height); - adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f), 5, 0, Qnil); + adjust_frame_size (f, width, height - FRAME_MENU_BAR_LINES (f), + 5, 0, Qterminal_frame); } adjust_frame_glyphs (f); @@ -3207,14 +3211,14 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist) that here since otherwise a size change implied by an intermittent font change may get lost as in Bug#17142. */ if (!width_change) - width = (f->new_width + width = ((f->can_x_set_window_size && f->new_width) ? (f->new_pixelwise ? f->new_width : (f->new_width * FRAME_COLUMN_WIDTH (f))) : FRAME_TEXT_WIDTH (f)); if (!height_change) - height = (f->new_height + height = ((f->can_x_set_window_size && f->new_height) ? (f->new_pixelwise ? f->new_height : (f->new_height * FRAME_LINE_HEIGHT (f))) @@ -4828,6 +4832,8 @@ syms_of_frame (void) DEFSYM (Qset_window_configuration, "set-window-configuration"); DEFSYM (Qx_create_frame_1, "x-create-frame-1"); DEFSYM (Qx_create_frame_2, "x-create-frame-2"); + DEFSYM (Qtip_frame, "tip-frame"); + DEFSYM (Qterminal_frame, "terminal-frame"); #ifdef HAVE_NS DEFSYM (Qns_parse_geometry, "ns-parse-geometry"); diff --git a/src/w32fns.c b/src/w32fns.c index 2dd92ff..1db47f2 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -1745,7 +1745,8 @@ x_change_tool_bar_height (struct frame *f, int height) f->n_tool_bar_rows = 0; adjust_frame_size (f, -1, -1, - (!f->tool_bar_redisplayed_once ? 1 + ((!f->tool_bar_redisplayed_once + && NILP (get_frame_param (f, Qfullscreen))) ? 1 : (old_height == 0 || height == 0) ? 2 : 4), 0, Qtool_bar_lines); @@ -5786,7 +5787,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, SET_FRAME_COLS (f, 0); SET_FRAME_LINES (f, 0); adjust_frame_size (f, width * FRAME_COLUMN_WIDTH (f), - height * FRAME_LINE_HEIGHT (f), 0, 1, Qnil); + height * FRAME_LINE_HEIGHT (f), 0, 1, Qtip_frame); /* Add `tooltip' frame parameter's default value. */ if (NILP (Fframe_parameter (frame, Qtooltip))) diff --git a/src/xfns.c b/src/xfns.c index 936c769..c1a9e6c 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1079,7 +1079,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) void x_change_tool_bar_height (struct frame *f, int height) { -#ifdef USE_GTK +#if defined (USE_GTK) || defined (HAVE_NS) FRAME_TOOL_BAR_LINES (f) = 0; FRAME_TOOL_BAR_HEIGHT (f) = 0; if (height) @@ -1100,6 +1100,7 @@ x_change_tool_bar_height (struct frame *f, int height) int unit = FRAME_LINE_HEIGHT (f); int old_height = FRAME_TOOL_BAR_HEIGHT (f); int lines = (height + unit - 1) / unit; + Lisp_Object fullscreen; /* Make sure we redisplay all windows in this frame. */ windows_or_buffers_changed = 60; @@ -1131,7 +1132,10 @@ x_change_tool_bar_height (struct frame *f, int height) f->n_tool_bar_rows = 0; adjust_frame_size (f, -1, -1, - (!f->tool_bar_redisplayed_once ? 1 + ((!f->tool_bar_redisplayed_once + && (NILP (fullscreen = + get_frame_param (f, Qfullscreen)) + || EQ (fullscreen, Qfullwidth))) ? 1 : (old_height == 0 || height == 0) ? 2 : 4), 0, Qtool_bar_lines); diff --git a/src/xterm.c b/src/xterm.c index 3955d02..971f342 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9343,13 +9343,22 @@ x_check_fullscreen (struct frame *f) break; case FULLSCREEN_WIDTH: width = x_display_pixel_width (dpyinfo); - break; + height = height + FRAME_MENUBAR_HEIGHT (f); + break; case FULLSCREEN_HEIGHT: height = x_display_pixel_height (dpyinfo); } XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), width, height); + + if (FRAME_VISIBLE_P (f)) + x_wait_for_event (f, ConfigureNotify); + else + { + change_frame_size (f, width, height, false, true, false, true); + x_sync (f); + } } }