From ba0b9239d30f612ced693b6ba52923f6110140a4 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 15 Feb 2021 17:28:21 -0300 Subject: [PATCH] layout: Allow updating struts in Overview LayoutManager doesn't update struts when there's any modal running. Turns out, the Overview itself is a modal. That, and the fact that the Overview will be the startup state, prevents the workarea to be updated. Allow updating struts when there's no other modal than the Overview. Part-of: --- js/ui/layout.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index 8104ea89e..c2c8151c1 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -957,13 +957,9 @@ var LayoutManager = GObject.registerClass({ delete this._updateRegionIdle; } - // No need to update when we have a modal. - if (Main.modalCount > 0) - return GLib.SOURCE_REMOVE; - let rects = [], struts = [], i; let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow); - let wantsInputRegion = !isPopupMenuVisible; + const wantsInputRegion = !isPopupMenuVisible && Main.modalCount === 0; for (i = 0; i < this._trackedActors.length; i++) { let actorData = this._trackedActors[i]; @@ -1034,7 +1030,9 @@ var LayoutManager = GObject.registerClass({ } } - global.set_stage_input_region(rects); + if (wantsInputRegion) + global.set_stage_input_region(rects); + this._isPopupWindowVisible = isPopupMenuVisible; let workspaceManager = global.workspace_manager;