Subject: Re: bug#74496: 30.0.91; fullscreen frame set with F11 is shifted when ctwm restarts

From: martin rudalics <[email-masked]>
Date: Sun, 8 Dec 2024 17:16:38 +0100

>     gpg: Signature made 23 June 2024 01:04:32 am AEST using RSA key ID 5957135D
...
 >   error: while searching for:
 >
 >   #endif /* !defined USE_X_TOOLKIT && !defined USE_GTK */
 >
 >   #ifdef USE_GTK
 >         if (!f
 >   	  && (f = any)
 >
 >   error: patch failed: src/xterm.c:21573
 >   error: src/xterm.c: patch does not apply

Your tar file is probably too old.  I attach a diff that doesn't contain
that hunk.  If it's needed, I'll tell you later how to do that manually.

martin

diff --git a/src/xterm.c b/src/xterm.c
index fd3e58f85f6..3087e10dddf 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);
 }
@@ -28272,7 +28277,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 +28350,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