layout: Update workspace struts even while starting up

We want to avoid updating the input region on startup, since it incurs
in roundtrips to the X server, but not workspaces struts, since they
affect the visible clip of wallpapers in the workspace. Since next
commits will make the overview be the after-boot screen, we really
don't want the wallpaper to be clipped wrongly.

Allow updating regions while starting up, but only workspace struts.
Make sure input is not updated by accounting for 'this._startingUp'
on 'wantsInputRegion'.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1678>
This commit is contained in:
Georges Basile Stavracas Neto 2021-02-25 10:35:30 -03:00 committed by Marge Bot
parent bc0974618f
commit e3f12e3e23

View File

@ -918,9 +918,6 @@ var LayoutManager = GObject.registerClass({
}
_queueUpdateRegions() {
if (this._startingUp)
return;
if (!this._updateRegionIdle) {
this._updateRegionIdle = Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
this._updateRegions.bind(this));
@ -960,6 +957,7 @@ var LayoutManager = GObject.registerClass({
let rects = [], struts = [], i;
let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
const wantsInputRegion =
!this._startingUp &&
!isPopupMenuVisible &&
Main.modalCount === 0 &&
!Meta.is_wayland_compositor();