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

From: martin rudalics <[email-masked]>
Date: Thu, 5 Dec 2024 19:02:02 +0100

> Some more details looking at the dimensions on the xterm are as follows.

I suppose you won't see any maximized/fullscreen there.  xterms don't
have that.  Can you try with Firefox?

I meanwhile managed to run a Lucid build under CWTM.  The behavior below
shows xwininfo output, 'frame-geometry' and fullscreen frame parameter.

Restarting CWTM does not change the size of a maximized or fullscreen
frame here.  Maximized frames stay at 1674x1007 pixels (1680x1050 outer
size).  Fullboth frames stay at 1680x1050 pixels (1686x1093 outer size).
I suppose the borders sum up to 6 pixels and the title bar to 40 pixels
and for fullboth frames they are "drawn" outside the display.  All these
sum up correctly and there is no shrinking.  Also, the -3 values your
'frame-geometry' reports for external border sizes are not reproducible
here.

What happens though is:

- The fullscreen parameter is reset to nil in both cases after a CTWM
   restart.  This is a bug I will debug tomorrow but it's possible that
   we can't do anything about it.

- When restarting CTWM there is a short moment (less than a second)
   where the frame shrinks slightly in both cases.  I'll take a look into
   this with the frame size history facility.

- A maximized/fullscreen GTK-3 built frame is broken after a CTWM
   restart in the sense that scrollbars are no more positioned correctly
   - they are drawn partially offscreen.  Have you ever tried building
   with GTK-3?

In particular the last issue means that we do not get the expected
values from X routines like XGetGeometry and XGetWindowProperty.

martin

Maximized

xwininfo: Window id: 0x1400181 "*shell*"

   Absolute upper-left X:  3
   Absolute upper-left Y:  40
   Relative upper-left X:  3
   Relative upper-left Y:  40
   Width: 1674
   Height: 1007
   Depth: 24
   Visual: 0x21
   Visual Class: TrueColor
   Border width: 0
   Class: InputOutput
   Colormap: 0x20 (installed)
   Bit Gravity State: NorthWestGravity
   Window Gravity State: NorthWestGravity
   Backing Store State: NotUseful
   Save Under State: no
   Map State: IsViewable
   Override Redirect State: no
   Corners:  +3+40  -3+40  -3-3  +3-3
   -geometry 1642x958+0+0

(frame-geometry) =>
((outer-position 0 . 0) (outer-size 1680 . 1050)
  (external-border-size 3 . 3) (outer-border-width . 0)
  (title-bar-size 0 . 37) (menu-bar-external . t)
  (menu-bar-size 1674 . 31) (tab-bar-size 0 . 0) (tool-bar-external)
  (tool-bar-position . top) (tool-bar-size 0 . 0)
  (internal-border-width . 1))

(frame-parameter nil 'fullscreen) => maximized

Maximized after restart

xwininfo: Window id: 0x1400181 "*shell*"

   Absolute upper-left X:  3
   Absolute upper-left Y:  40
   Relative upper-left X:  3
   Relative upper-left Y:  40
   Width: 1674
   Height: 1007
   Depth: 24
   Visual: 0x21
   Visual Class: TrueColor
   Border width: 0
   Class: InputOutput
   Colormap: 0x20 (installed)
   Bit Gravity State: NorthWestGravity
   Window Gravity State: NorthWestGravity
   Backing Store State: NotUseful
   Save Under State: no
   Map State: IsViewable
   Override Redirect State: no
   Corners:  +3+40  -3+40  -3-3  +3-3
   -geometry 1642x958+0+0

(frame-geometry) =>
((outer-position 0 . 0) (outer-size 1680 . 1050)
  (external-border-size 3 . 3) (outer-border-width . 0)
  (title-bar-size 0 . 37) (menu-bar-external . t)
  (menu-bar-size 1674 . 31) (tab-bar-size 0 . 0) (tool-bar-external)
  (tool-bar-position . top) (tool-bar-size 0 . 0)
  (internal-border-width . 1))

(frame-parameter nil 'fullscreen) => nil

Fullboth after F11

xwininfo: Window id: 0x1400181 "*shell*"

   Absolute upper-left X:  0
   Absolute upper-left Y:  0
   Relative upper-left X:  3
   Relative upper-left Y:  40
   Width: 1680
   Height: 1050
   Depth: 24
   Visual: 0x21
   Visual Class: TrueColor
   Border width: 0
   Class: InputOutput
   Colormap: 0x20 (installed)
   Bit Gravity State: NorthWestGravity
   Window Gravity State: NorthWestGravity
   Backing Store State: NotUseful
   Save Under State: no
   Map State: IsViewable
   Override Redirect State: no
   Corners:  +0+0  -0+0  -0-0  +0-0
   -geometry 1648x1001+-3--3

(frame-geometry) =>
((outer-position -3 . -40) (outer-size 1686 . 1093)
  (external-border-size 3 . 3) (outer-border-width . 0)
  (title-bar-size 0 . 37) (menu-bar-external . t)
  (menu-bar-size 1680 . 31) (tab-bar-size 0 . 0) (tool-bar-external)
  (tool-bar-position . top) (tool-bar-size 0 . 0)
  (internal-border-width . 1))

(frame-parameter nil 'fullscreen) => fullboth

Fullboth after restart

xwininfo: Window id: 0x1400181 "*shell*"

   Absolute upper-left X:  0
   Absolute upper-left Y:  0
   Relative upper-left X:  3
   Relative upper-left Y:  40
   Width: 1680
   Height: 1050
   Depth: 24
   Visual: 0x21
   Visual Class: TrueColor
   Border width: 0
   Class: InputOutput
   Colormap: 0x20 (installed)
   Bit Gravity State: NorthWestGravity
   Window Gravity State: NorthWestGravity
   Backing Store State: NotUseful
   Save Under State: no
   Map State: IsViewable
   Override Redirect State: no
   Corners:  +0+0  -0+0  -0-0  +0-0
   -geometry 1648x1001+-3--3

(frame-geometry) =>
((outer-position -3 . -40) (outer-size 1686 . 1093)
  (external-border-size 3 . 3) (outer-border-width . 0)
  (title-bar-size 0 . 37) (menu-bar-external . t)
  (menu-bar-size 1680 . 31) (tab-bar-size 0 . 0) (tool-bar-external)
  (tool-bar-position . top) (tool-bar-size 0 . 0)
  (internal-border-width . 1))

(frame-parameter nil 'fullscreen) => nil