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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1678>
This commit is contained in:
parent
9cd211a99a
commit
ba0b9239d3
@ -957,13 +957,9 @@ var LayoutManager = GObject.registerClass({
|
|||||||
delete this._updateRegionIdle;
|
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 rects = [], struts = [], i;
|
||||||
let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow);
|
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++) {
|
for (i = 0; i < this._trackedActors.length; i++) {
|
||||||
let actorData = this._trackedActors[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;
|
this._isPopupWindowVisible = isPopupMenuVisible;
|
||||||
|
|
||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
|
Loading…
Reference in New Issue
Block a user