emacs-31 a34c29e4598: Restore frame's fullheight/fullwidth after exiting from fullboth (Bug#81165)

Martin Rudalics via Mailing list for Emacs changes <[email protected]> Sun, 28 Jun 2026 04:27:40 -0400 (EDT)
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: emacs-31
commit a34c29e4598dd442b1b630da2923b2a698631ffe
Author: Martin Rudalics <[email protected]>
Commit: Martin Rudalics <[email protected]>

    Restore frame's fullheight/fullwidth after exiting from fullboth (Bug#81165)
    
    * src/xterm.c (do_ewmh_fullscreen): Try to restore
    fullheight/fullwidth states after exiting from fullboth state
    (Bug#81165).
---
 src/xterm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index d95de2ef86b..bc654952360 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -28133,7 +28133,8 @@ do_ewmh_fullscreen (struct frame *f)
 		  || cur == FULLSCREEN_MAXIMIZED)
 		set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen,
 			      dpyinfo->Xatom_net_wm_state_maximized_vert);
-	      if (cur != FULLSCREEN_MAXIMIZED || x_frame_normalize_before_maximize)
+	      if ((cur != FULLSCREEN_MAXIMIZED  && cur != FULLSCREEN_BOTH)
+		  || x_frame_normalize_before_maximize)
 		set_wm_state (frame, true,
 			      dpyinfo->Xatom_net_wm_state_maximized_horz, None);
 	    }
@@ -28153,7 +28154,8 @@ do_ewmh_fullscreen (struct frame *f)
 		  || cur == FULLSCREEN_MAXIMIZED)
 		set_wm_state (frame, false, dpyinfo->Xatom_net_wm_state_fullscreen,
 			      dpyinfo->Xatom_net_wm_state_maximized_horz);
-	      if (cur != FULLSCREEN_MAXIMIZED || x_frame_normalize_before_maximize)
+	      if ((cur != FULLSCREEN_MAXIMIZED && cur != FULLSCREEN_BOTH)
+		  || x_frame_normalize_before_maximize)
 		set_wm_state (frame, true,
 			      dpyinfo->Xatom_net_wm_state_maximized_vert, None);
 	    }