mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
@@ -88,7 +88,8 @@ var Intellihide = class {
|
||||
|
||||
if (Me.settings.get_boolean('intellihide-hide-from-windows')) {
|
||||
this._proximityWatchId = this._proximityManager.createWatch(
|
||||
this._panelBox.get_parent(),
|
||||
this._panelBox.get_parent(),
|
||||
this._dtpPanel.monitor.index,
|
||||
Proximity.Mode[Me.settings.get_string('intellihide-behaviour')],
|
||||
0, 0,
|
||||
overlap => {
|
||||
|
||||
18
proximity.js
18
proximity.js
@@ -38,8 +38,9 @@ var Mode = {
|
||||
|
||||
class ProximityWatch {
|
||||
|
||||
constructor(actor, mode, xThreshold, yThreshold, handler) {
|
||||
constructor(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
|
||||
this.actor = actor;
|
||||
this.monitorIndex = monitorIndex
|
||||
this.overlap = 0;
|
||||
this.mode = mode;
|
||||
this.threshold = [xThreshold, yThreshold];
|
||||
@@ -47,18 +48,12 @@ class ProximityWatch {
|
||||
|
||||
this._allocationChangedId = actor.connect('notify::allocation', () => this._update());
|
||||
|
||||
this._update();
|
||||
this._updateWatchRect();
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.actor.disconnect(this._allocationChangedId);
|
||||
}
|
||||
|
||||
_update() {
|
||||
this.monitorIndex = Main.layoutManager.findIndexForActor(this.actor);
|
||||
|
||||
this._updateWatchRect();
|
||||
}
|
||||
|
||||
_updateWatchRect() {
|
||||
let [actorX, actorY] = this.actor.get_position();
|
||||
@@ -86,8 +81,8 @@ var ProximityManager = class {
|
||||
this._setFocusedWindow();
|
||||
}
|
||||
|
||||
createWatch(actor, mode, xThreshold, yThreshold, handler) {
|
||||
let watch = new ProximityWatch(actor, mode, xThreshold, yThreshold, handler);
|
||||
createWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
|
||||
let watch = new ProximityWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler);
|
||||
|
||||
this._watches[this._counter] = watch;
|
||||
this.update();
|
||||
@@ -247,7 +242,8 @@ var ProximityManager = class {
|
||||
this._checkProximity(this._focusedWindowInfo.metaWindow, watch));
|
||||
} else if (watch.mode === Mode.MAXIMIZED_WINDOWS) {
|
||||
return metaWindows.some(mw => mw.maximized_vertically && mw.maximized_horizontally &&
|
||||
mw.get_monitor() == watch.monitorIndex);
|
||||
mw.get_monitor() == watch.monitorIndex &&
|
||||
mw.get_workspace() == Utils.getCurrentWorkspace());
|
||||
}
|
||||
|
||||
//Mode.ALL_WINDOWS
|
||||
|
||||
@@ -138,7 +138,8 @@ var DynamicTransparency = class {
|
||||
let threshold = Me.settings.get_int('trans-dynamic-distance');
|
||||
|
||||
this._proximityWatchId = this._proximityManager.createWatch(
|
||||
this._dtpPanel.panelBox.get_parent(),
|
||||
this._dtpPanel.panelBox.get_parent(),
|
||||
this._dtpPanel.monitor.index,
|
||||
Proximity.Mode[Me.settings.get_string('trans-dynamic-behavior')],
|
||||
isVertical ? threshold : 0,
|
||||
isVertical ? 0 : threshold,
|
||||
|
||||
Reference in New Issue
Block a user