diff --git a/appIcons.js b/appIcons.js index 9656106..c517689 100644 --- a/appIcons.js +++ b/appIcons.js @@ -356,11 +356,11 @@ var taskbarAppIcon = Utils.defineClass({ onWindowsChanged: function() { this._updateCounterClass(); - this.updateIconGeometry(); + this.updateIcon(); }, - // Update taraget for minimization animation - updateIconGeometry: function() { + // Update indicator and target for minimization animation + updateIcon: function(updateIndicators) { // If (for unknown reason) the actor is not on the stage the reported size // and position are random values, which might exceeds the integer range @@ -378,6 +378,10 @@ var taskbarAppIcon = Utils.defineClass({ windows.forEach(function(w) { w.set_icon_geometry(rect); }); + + if (updateIndicators) { + this._displayProperIndicator(); + } }, _showDots: function() { diff --git a/panelManager.js b/panelManager.js index 88f5f56..56aa0b3 100755 --- a/panelManager.js +++ b/panelManager.js @@ -140,9 +140,9 @@ var dtpPanelManager = Utils.defineClass({ this._oldGetShowAppsButton = Main.overview.getShowAppsButton; Main.overview.getShowAppsButton = this._newGetShowAppsButton.bind(this); - this._needsDashItemContainerAllocate = !Dash.DashItemContainer.prototype.hasOwnProperty('vfunc_allocate'); + this.needsDashItemContainerAllocate = !Dash.DashItemContainer.prototype.hasOwnProperty('vfunc_allocate'); - if (this._needsDashItemContainerAllocate) { + if (this.needsDashItemContainerAllocate) { Utils.hookVfunc(Dash.DashItemContainer.prototype, 'allocate', this._newDashItemContainerAllocate); } @@ -239,7 +239,7 @@ var dtpPanelManager = Utils.defineClass({ Main.layoutManager.panelBox.set_size(Main.layoutManager.primaryMonitor.width, -1); } - if (this._needsDashItemContainerAllocate) { + if (this.needsDashItemContainerAllocate) { Utils.hookVfunc(Dash.DashItemContainer.prototype, 'allocate', function(box, flags) { this.vfunc_allocate(box, flags); }); } }, diff --git a/taskbar.js b/taskbar.js index ad1b260..1b5c3e7 100644 --- a/taskbar.js +++ b/taskbar.js @@ -184,6 +184,7 @@ var taskbar = Utils.defineClass({ this.iconSize = 16; this._shownInitially = false; + this._updateIndicators = false; this._position = getPosition(); this._signalsHandler = new Utils.GlobalSignalsHandler(); @@ -248,9 +249,9 @@ var taskbar = Utils.defineClass({ // Update minimization animation target position on allocation of the // container and on scrollview change. - this._box.connect('notify::allocation', Lang.bind(this, this._updateAppIconsGeometry)); + this._box.connect('notify::allocation', Lang.bind(this, this._updateAppIcons)); let scrollViewAdjustment = this._scrollView.hscroll.adjustment; - scrollViewAdjustment.connect('notify::value', Lang.bind(this, this._updateAppIconsGeometry)); + scrollViewAdjustment.connect('notify::value', Lang.bind(this, this._updateAppIcons)); this._workId = Main.initializeDeferredWork(this._box, Lang.bind(this, this._redisplay)); @@ -300,6 +301,7 @@ var taskbar = Utils.defineClass({ ], () => { if (this._dtpSettings.get_boolean('isolate-monitors')) { + this._updateIndicators = this.isGroupApps && !this.panelWrapper.panelManager.needsDashItemContainerAllocate; this._queueRedisplay(); } } @@ -665,12 +667,14 @@ var taskbar = Utils.defineClass({ }); }, - _updateAppIconsGeometry: function() { + _updateAppIcons: function() { let appIcons = this._getAppIcons(); - appIcons.filter(icon => icon.constructor === AppIcons.taskbarAppIcon).forEach(function(icon) { - icon.updateIconGeometry(); + appIcons.filter(icon => icon.constructor === AppIcons.taskbarAppIcon).forEach(icon => { + icon.updateIcon(this._updateIndicators); }); + + this._updateIndicators = false; }, _itemMenuStateChanged: function(item, opened) { @@ -865,7 +869,7 @@ var taskbar = Utils.defineClass({ this._box.queue_relayout(); // This is required for icon reordering when the scrollview is used. - this._updateAppIconsGeometry(); + this._updateAppIcons(); // This will update the size, and the corresponding number for each icon on the primary panel if (!this.panelWrapper.isSecondary) {