diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index 10b97c7ac..3b5ec583f 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -341,6 +341,9 @@ class ControlsManager extends St.Widget { this.dash.showAppsButton); this._searchController.connect('notify::search-active', this._onSearchChanged.bind(this)); + Main.layoutManager.connect('monitors-changed', () => { + this._thumbnailsBox.setMonitorIndex(Main.layoutManager.primaryIndex); + }); this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox( this._workspaceAdjustment, Main.layoutManager.primaryIndex); this._thumbnailsBox.connect('notify::should-show', () => { diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index cf03756a5..6c5a2bee4 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -715,6 +715,10 @@ var ThumbnailsBox = GObject.registerClass({ () => this._updateIndicator()); } + setMonitorIndex(monitorIndex) { + this._monitorIndex = monitorIndex; + } + _onDestroy() { this._unqueueUpdateStates();