Fix "Hide panel and dock"

This commit is contained in:
abakkk 2020-06-01 20:28:26 +02:00
parent 11a00a25d0
commit 91475c8b70
1 changed files with 8 additions and 4 deletions

View File

@ -262,19 +262,23 @@ var AreaManager = new Lang.Class({
// dash-to-dock
let dtdContainers = Main.uiGroup.get_children().filter((actor) => {
return actor.name && actor.name == 'dashtodockContainer' &&
actor._delegate &&
((actor._delegate &&
actor._delegate._monitorIndex !== undefined &&
actor._delegate._monitorIndex == activeIndex;
actor._delegate._monitorIndex == activeIndex) ||
// dtd v68+
(actor._monitorIndex !== undefined &&
actor._monitorIndex == activeIndex));
});
// for simplicity, we assume that main dash-to-panel panel is displayed on primary monitor
// and we hide all secondary panels together if the active area is not on the primary
let name = activeIndex == Main.layoutManager.primaryIndex ? 'panelBox' : 'dashtopanelSecondaryPanelBox';
let panelBoxes = Main.uiGroup.get_children().filter((actor) => {
return actor.name && actor.name == name;
return actor.name && actor.name == name ||
// dtp v37+
actor.get_children().length && actor.get_children()[0].name && actor.get_children()[0].name == name;
});
let actorToHide = dtdContainers.concat(panelBoxes);
this.hiddenList = [];
for (let i = 0; i < actorToHide.length; i++) {