diff --git a/src/xterm.c b/src/xterm.c index fd3e58f85f6..ef354a54d1e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -18041,7 +18041,12 @@ x_net_wm_state (struct frame *f, Window window) break; } - store_frame_param (f, Qfullscreen, lval); + if (EQ (get_frame_param (f, Qfullscreen), Qfullheight) + || EQ (lval, Qfullheight)) + store_frame_param (f, Qfullscreen, lval); // break here + else + store_frame_param (f, Qfullscreen, lval); + store_frame_param (f, Qsticky, sticky ? Qt : Qnil); store_frame_param (f, Qshaded, shaded ? Qt : Qnil); } @@ -21573,6 +21578,14 @@ handle_one_xevent (struct x_display_info *dpyinfo, #endif /* !defined USE_X_TOOLKIT && !defined USE_GTK */ + if (f && CONSP (frame_size_history)) + frame_size_history_extra + (f, build_string ("ConfigureNotify"), + FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f), + configureEvent.xconfigure.width, + configureEvent.xconfigure.height, + f->new_width, f->new_height); + #ifdef USE_GTK if (!f && (f = any) @@ -21581,15 +21594,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, || !(configureEvent.xconfigure.width <= 1 && configureEvent.xconfigure.height <= 1))) { - - if (CONSP (frame_size_history)) - frame_size_history_extra - (f, build_string ("ConfigureNotify"), - FRAME_PIXEL_WIDTH (f), FRAME_PIXEL_HEIGHT (f), - configureEvent.xconfigure.width, - configureEvent.xconfigure.height, - f->new_width, f->new_height); - #ifdef HAVE_XDBE if (FRAME_X_DOUBLE_BUFFERED_P (f)) x_drop_xrender_surfaces (f); @@ -28272,7 +28276,12 @@ x_handle_net_wm_state (struct frame *f, const XPropertyEvent *event) break; } - store_frame_param (f, Qfullscreen, lval); + if (EQ (get_frame_param (f, Qfullscreen), Qfullheight) + || EQ (lval, Qfullheight)) + store_frame_param (f, Qfullscreen, lval); // break here + else + store_frame_param (f, Qfullscreen, lval); + store_frame_param (f, Qsticky, sticky ? Qt : Qnil); store_frame_param (f, Qshaded, shaded ? Qt : Qnil); @@ -28340,7 +28349,11 @@ x_check_fullscreen (struct frame *f) /* `x_net_wm_state' might have reset the fullscreen frame parameter, restore it. */ - store_frame_param (f, Qfullscreen, lval); + if (EQ (get_frame_param (f, Qfullscreen), Qfullheight) + || EQ (lval, Qfullheight)) + store_frame_param (f, Qfullscreen, lval); // break here + else + store_frame_param (f, Qfullscreen, lval); } /* This function is called by x_set_offset to determine whether the window