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

From: martin rudalics <[email-masked]>
Date: Sat, 7 Dec 2024 16:52:52 +0100

I'll take a look into
 >   this with the frame size history facility.
 > That first time I measured the frame attributes and the values persisted
 > after a ctwm restart was from
 >
 >          (setq frame-resize-pixelwise t)
 >
 > you were expecting values to be different from the first data capture I
 > reported and I had misattributed the cause to be the presence of a
 > maximized full screen.
 >
 > I hadn't put that setting in the init file and forgot about that.

I should have told you but I forgot as well.  We'd eventually have to
install a watcher for this variable.  Whenever it is (re-)set that would
(re-)set the size hints accordingly, maybe even in a let-binding.  But
this requires some experimenting.  At the time 'frame-resize-pixelwise'
was implemented, variable watchers were not available yet.

 > ;; with frame-resize-pixelwise setting confirmed
 > (setq-default frame-resize-pixelwise t)
 >
 >
 >
 > Fullboth after F11
...
 >    Width: 1920
 >    Height: 1080
...
 > (frame-parameter nil 'fullscreen) =>
 > fullboth
...
 > Fullboth after restart
...
 >    Width: 1920
 >    Height: 1080
...
 > (frame-parameter nil 'fullscreen) =>
 > nil
...
 > Maximized
 >
 > xwininfo: Window id: 0x400220 "*About GNU Emacs*"
...
 >    Width: 1914
 >    Height: 1074
....
 > (frame-parameter nil 'fullscreen) =>
 > maximized
...
 > Maximized after restart
...
 >    Width: 1914
 >    Height: 1074
...
 > (frame-parameter nil 'fullscreen) =>
 > nil

So IIUC the unexpected resizing with CTWM restart can be fixed by
setting 'frame-resize-pixelwise' to t.  The fullscreen parameter
settings are still broken.  These might be related to an obscure
variable I coined 'x-frame-normalize-before-maximize' years ago but I
have to experiment with it myself before telling you more.

BTW, earlier I wrote that

 > - When restarting CTWM there is a short moment (less than a second)
 >   where the frame shrinks slightly in both cases.

Meanwhile I noticed the same behavior with all "vertically zoomed"
windows including those on xterms.  Can you observe a similar effect?

martin