Fix "Hide panel and dock"
This commit is contained in:
parent
11a00a25d0
commit
91475c8b70
12
extension.js
12
extension.js
|
|
@ -262,19 +262,23 @@ var AreaManager = new Lang.Class({
|
||||||
// dash-to-dock
|
// dash-to-dock
|
||||||
let dtdContainers = Main.uiGroup.get_children().filter((actor) => {
|
let dtdContainers = Main.uiGroup.get_children().filter((actor) => {
|
||||||
return actor.name && actor.name == 'dashtodockContainer' &&
|
return actor.name && actor.name == 'dashtodockContainer' &&
|
||||||
actor._delegate &&
|
((actor._delegate &&
|
||||||
actor._delegate._monitorIndex !== undefined &&
|
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
|
// 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
|
// 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 name = activeIndex == Main.layoutManager.primaryIndex ? 'panelBox' : 'dashtopanelSecondaryPanelBox';
|
||||||
let panelBoxes = Main.uiGroup.get_children().filter((actor) => {
|
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);
|
let actorToHide = dtdContainers.concat(panelBoxes);
|
||||||
this.hiddenList = [];
|
this.hiddenList = [];
|
||||||
for (let i = 0; i < actorToHide.length; i++) {
|
for (let i = 0; i < actorToHide.length; i++) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue