diff --git a/panel.js b/panel.js index 0622ab1..3e2c9fc 100644 --- a/panel.js +++ b/panel.js @@ -128,19 +128,14 @@ var dtpPanelWrapper = new Lang.Class({ }); if (this.panel.vfunc_allocate) { - let vfuncAllocate = (box, flags) => { - //panel inherits from St.Widget, invoke its parent allocation - St.Widget.prototype.vfunc_allocate.call(this.panel, box, flags); - this._allocate(null, box, flags); - }; - this._panelConnectId = 0; - if (this.isSecondary) { - this.panel.allocateProxy = vfuncAllocate; - } else { - this._oldAllocate = this.panel.__proto__.vfunc_allocate; - this.panel.__proto__[Gi.hook_up_vfunc_symbol]('allocate', vfuncAllocate); + if (!this.panel.__proto__._dtpOldAllocate) { + this.panel.__proto__._dtpOldAllocate = this.panel.__proto__.vfunc_allocate; + this.panel.__proto__[Gi.hook_up_vfunc_symbol]('allocate', (box, flags) => { + this.panel.set_allocation(box, flags); + this._allocate(null, box, flags) + }); } } else { this._panelConnectId = this.panel.actor.connect('allocate', (actor,box,flags) => this._allocate(actor,box,flags)); @@ -277,8 +272,9 @@ var dtpPanelWrapper = new Lang.Class({ if (this._panelConnectId) { this.panel.actor.disconnect(this._panelConnectId); - } else if (this._oldAllocate) { - this.panel.__proto__[Gi.hook_up_vfunc_symbol]('allocate', this._oldAllocate); + } else if (this.panel.__proto__._dtpOldAllocate) { + this.panel.__proto__[Gi.hook_up_vfunc_symbol]('allocate', this.panel.__proto__._dtpOldAllocate); + delete this.panel.__proto__._dtpOldAllocate; } if (this.startIntellihideId) { @@ -381,11 +377,11 @@ var dtpPanelWrapper = new Lang.Class({ }, _adjustForOverview: function() { - let isFocusedMonitor = Main.overview.viewSelector._workspacesDisplay._primaryIndex == this.monitor.index; + let isFocusedMonitor = this.panelManager.checkIfFocusedMonitor(this.monitor); let isOverview = !!Main.overview.visibleTarget; let isShown = !isOverview || (isOverview && isFocusedMonitor); - this.panel.actor[isShown ? 'show' : 'hide'](); + this.panelBox[isShown ? 'show' : 'hide'](); if (isOverview && isFocusedMonitor) { Main.overview._overview.add_actor(this._myPanelGhost); @@ -735,10 +731,8 @@ var dtpSecondaryPanel = new Lang.Class({ }, - vfunc_allocate: function(box, flags) { - (this.allocateProxy || function(){})(box, flags); - }, - + vfunc_allocate: function(box, flags) {}, + _setPanelMenu: function(settingName, propName, constr, container, isInit) { if (isInit) { this._panelMenuSignalIds.push(this._dtpSettings.connect( diff --git a/panelManager.js b/panelManager.js index 7397af3..94ec25a 100755 --- a/panelManager.js +++ b/panelManager.js @@ -227,7 +227,7 @@ var dtpPanelManager = new Lang.Class({ }, setFocusedMonitor: function(monitor, ignoreRelayout) { - if (Main.overview.viewSelector._workspacesDisplay._primaryIndex != monitor.index) { + if (!this.checkIfFocusedMonitor(monitor)) { Main.overview.viewSelector._workspacesDisplay._primaryIndex = monitor.index; Main.overview._overview.clear_constraints(); @@ -239,6 +239,10 @@ var dtpPanelManager = new Lang.Class({ } }, + checkIfFocusedMonitor: function(monitor) { + return Main.overview.viewSelector._workspacesDisplay._primaryIndex == monitor.index; + }, + _reset: function() { this.disable(true); this.enable(true); @@ -357,7 +361,7 @@ var dtpPanelManager = new Lang.Class({ }, _newGetShowAppsButton: function() { - return this.allPanels.find(p => p.monitor.index == Main.overview.viewSelector._workspacesDisplay._primaryIndex).taskbar.showAppsButton; + return this.allPanels.find(p => this.checkIfFocusedMonitor(p.monitor)).taskbar.showAppsButton; } }); diff --git a/proximity.js b/proximity.js index 6081288..87e47d9 100644 --- a/proximity.js +++ b/proximity.js @@ -41,6 +41,7 @@ var ProximityWatch = new Lang.Class({ _init: function(actor, mode, xThreshold, yThreshold, handler) { this.actor = actor; + this.overlap = 0; this.mode = mode; this.threshold = [xThreshold, yThreshold]; this.handler = handler; diff --git a/stylesheet.css b/stylesheet.css index b7d875b..e31b892 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -39,6 +39,11 @@ padding: 0px; } +#dashtopanelThumbnailScrollview, +#dashtopanelScrollview { + -st-hfade-offset: 48px; +} + #dashtopanelScrollview .app-well-app:hover .overview-icon, #dashtopanelScrollview .app-well-app:focus .overview-icon { background: none; diff --git a/taskbar.js b/taskbar.js index 5e1fa7a..cee5daf 100644 --- a/taskbar.js +++ b/taskbar.js @@ -136,8 +136,8 @@ var taskbarActor = new Lang.Class({ let destFadeOffset = hiddenAppIconsBoxWidth > 0 ? SCROLLVIEW_FADE_SIZE : 0; if (destFadeOffset != this._fadeOffset) { - scrollview.update_fade_effect(0, destFadeOffset); this._fadeOffset = destFadeOffset; + scrollview.get_effect('fade').enabled = this._fadeOffset > 0; } },