Skip to content

Draft: layout: Keep panel struts regardless of visibility

This adds a new option to addChrome() to allow keeping struts regardless
of the visibility and uses it for the panel.

Previously when the panel got hidden to not cover up fullscreen windows
its struts were removed, resulting in a variety of issues:

The WorkspaceSwitcherPopup was basing its size and position on the size
of the workarea which it was created on. This lead to inconsistencies
when invoked on a workspace with a fullscreen window and then switching
to one without a fullscreen window.

When switching from a workspace with a fullscreen window to one with a
maximized window, causes the maximized window to jump from the
fullscreen size to the maximized size (i.e. excluding the panel) due to
struts being added during the switch.

Opening the overview with a fullscreen window was also triggering a jump
at the start of the animation.

Finally it was also causing all maximized windows to be resized at once
when a window was fullscreened, which could cause a short slowdown.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4714
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4716
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4717
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4775

Note that this does not regress on #4569 (closed). However #4714 (closed) will still occur to some degree when using the window list extension and switching from a fullscreen workspace to one without fullscreen windows. If the WorkspaceSwitcherPopup instead of the workarea used the entire screen, that would avoid this issue, but would potentially introduce another issue with the switcher overlapping panels/docks on the left/right when using enough workspaces.

Maybe reverting !1963 (merged) and trying to fix this on the window list extension side might be better?

Marking this as draft for now, because I want to fix the two mutter issues first anyway.

Merge request reports