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

From: Van Ly <[email-masked]>
Date: Sat, 07 Dec 2024 14:03:46 +0000

martin rudalics <[email-masked]> writes:

> More interesting is the following: With 'frame-resize-pixelwise' nil
> zooming a frame vertically gets me a pixel height of 962.  With
> 'frame-resize-pixelwise' t it gets me 976.  So please try again setting
>
> (setq frame-resize-pixelwise t)
>
> and do it in your init file.  Its doc-string says explicitly
>
>    With some window managers you may have to set this to non-nil in order
>    to set the size of a frame in pixels, to maximize frames or to make them
>    fullscreen.  To resize your initial frame pixelwise, set this option to
>    a non-nil value in your init file.

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.

Below is the state of the windowframes.

;; with frame-resize-pixelwise setting confirmed
(setq-default frame-resize-pixelwise t)

Fullboth after F11

xwininfo: Window id: 0x4001aa "*About GNU Emacs*"

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1920
  Height: 1080
  Depth: 24
  Visual: 0x20
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x22 (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 1902x1057+-3+-3

(frame-geometry)  =>
((outer-position -3 . -3) (outer-size 1920 . 1080)
(external-border-size -3 . -3) (outer-border-width . 0)
(title-bar-size 0 . 6) (menu-bar-external . t)
(menu-bar-size 0 . 0) (tab-bar-size 1918 . 21)
(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: 0x4001aa "*About GNU Emacs*"

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1920
  Height: 1080
  Depth: 24
  Visual: 0x20
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x22 (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 1902x1057+-3+-3

(frame-geometry) =>
((outer-position -3 . -3) (outer-size 1920 . 1080)
(external-border-size -3 . -3) (outer-border-width . 0)
(title-bar-size 0 . 6) (menu-bar-external . t)
(menu-bar-size 0 . 0) (tab-bar-size 1918 . 21)
(tool-bar-external) (tool-bar-position . top)
(tool-bar-size 0 . 0) (internal-border-width . 1))

(frame-parameter nil 'fullscreen) => 
nil

Maximized

xwininfo: Window id: 0x400220 "*About GNU Emacs*"

  Absolute upper-left X:  3
  Absolute upper-left Y:  3
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1914
  Height: 1074
  Depth: 24
  Visual: 0x20
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x22 (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+3  -3+3  -3-3  +3-3
  -geometry 1896x1051+0+0

(frame-geometry) =>
((outer-position 0 . 0) (outer-size 1914 . 1074)
(external-border-size -3 . -3) (outer-border-width . 0)
(title-bar-size 0 . 6) (menu-bar-external . t)
(menu-bar-size 0 . 0) (tab-bar-size 1912 . 21)
(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: 0x400220 "*About GNU Emacs*"

  Absolute upper-left X:  3
  Absolute upper-left Y:  3
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1914
  Height: 1074
  Depth: 24
  Visual: 0x20
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x22 (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+3  -3+3  -3-3  +3-3
  -geometry 1896x1051+0+0

(frame-geometry) =>
((outer-position 0 . 0) (outer-size 1914 . 1074)
(external-border-size -3 . -3) (outer-border-width . 0)
(title-bar-size 0 . 6) (menu-bar-external . t)
(menu-bar-size 0 . 0) (tab-bar-size 1912 . 21)
(tool-bar-external) (tool-bar-position . top)
(tool-bar-size 0 . 0) (internal-border-width . 1))

(frame-parameter nil 'fullscreen) =>
nil

-- 
vl