Gray area at the top of fullscreen X11 windows
Sometimes fullscreen windows appear to have a gray area at the top where the decorations would be if the window was not fullscreen. This is due to _MUTTER_FRAME_EXTENTS
not getting updated, which causes the client window to have an offset compared to the frame window. The frame window is not displaying any header, but the gray window background is still visible. This issue seems very much timing dependent and I have no fully reliable way to reproduce this.
I tried printing the allocated size and the widget position in meta_frame_content_size_allocate()
with the following results:
Working:
Aug 01 23:40:23 t460 gnome-shell[1628845]: size alloc: (1x1) 0 37
Aug 01 23:40:23 t460 gnome-shell[1628845]: size alloc: (1920x1080) 0 37
Aug 01 23:40:23 t460 gnome-shell[1628845]: size alloc: (1948x1109) 0 0
Aug 01 23:40:23 t460 gnome-shell[1628845]: size alloc: (1920x1080) 0 0
Another working case:
Aug 01 23:40:44 t460 gnome-shell[1628845]: size alloc: (1920x1080) 0 37
Aug 01 23:40:44 t460 gnome-shell[1628845]: size alloc: (1948x1109) 0 0
Aug 01 23:40:44 t460 gnome-shell[1628845]: size alloc: (1920x1080) 0 0
Bug:
Aug 01 23:40:49 t460 gnome-shell[1628845]: size alloc: (1x1) 0 37
Aug 01 23:40:49 t460 gnome-shell[1628845]: size alloc: (1920x1080) 0 37
Another buggy case:
Aug 02 00:27:28 t460 gnome-shell[1628845]: size alloc: (1920 1080) 0 37
So it looks like the size of the MetaFrameContent
is allocated while the headerbar is still affecting its position (so point.y == 37
). The size allocated here is already the fullscreen size, so there will be no further calls to meta_frame_content_size_allocate()
and _MUTTER_FRAME_EXTENTS
stays at 0,0,37,0
even when the window is in fullscreen mode and there is no actual headerbar to be shown.
xwininfo of the client window
xwininfo: Window id: 0x800014 "Absolute Drift"
Absolute upper-left X: 0
Absolute upper-left Y: 37
Relative upper-left X: 0
Relative upper-left Y: 37
Width: 1920
Height: 1043
Depth: 24
Visual: 0x3c
Visual Class: DirectColor
Border width: 0
Class: InputOutput
Colormap: 0x800010 (installed)
Bit Gravity State: ForgetGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +0+37 -0+37 -0-0 +0-0
-geometry 1920x1043+0+0
xwininfo of the frame window
xwininfo: Window id: 0x400117 "Absolute Drift"
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: 32
Visual: 0x354
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x400001 (not 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 1920x1080+0+0