GNOME Bugzilla – Bug 746365
boxpointer: Fix arrow side computation on secondary monitors
Last modified: 2015-03-24 12:26:04 UTC
When using window-list on multiple monitors, I noticed that the workspace indicator would open in the wrong direction (i.e. go "under" the monitor and not be visible) on secondary monitors. This happens if the secondary monitor bottom position is higher than the primary monitor bottom position. The workspace indicator would then open in the "gap" under the secondary monitor. I noticed that in boxpointer.js _calculateArrowSide(), the monitor would always be the primary one. I adapted the code to use _sourceActor, like it is done in _reposition().
Created attachment 299630 [details] [review] boxpointer: Fix arrow side computation on secondary monitors Use this._sourceActor for retrieving the current monitor instead of this.actor, which is always on the primary monitor.
Created attachment 299631 [details] [review] boxpointer: Fix arrow side computation on secondary monitors Use this._sourceActor for retrieving the current monitor instead of this.actor, which is always on the primary monitor.
Review of attachment 299631 [details] [review]: This isn't the problem, see the patch I'm attaching
Created attachment 299734 [details] [review] window-list: Fix WorkspaceIndicator's popup menu position By default, PanelMenu.Button creates a popup menu with arrow side TOP which is wrong in our case and can mess up BoxPointer's positioning. We can work around that easily by creating the menu ourselves with the correct arrow side.
Created attachment 299735 [details] [review] window-list: Remove the panel-menu style from WorkspaceIndicator PanelMenu.Button sets this style by default on its menu but it only makes sense for menus attached to a top panel since it adds a bottom margin to avoid long menus touching the bottom panel/monitor edge. In our case we don't want that because it leaves a gap between the menu and the indicator so let's just remove the style class.
(In reply to Rui Matos from comment #5) > Created attachment 299735 [details] [review] [review] > window-list: Remove the panel-menu style from WorkspaceIndicator Old checkout? See https://git.gnome.org/browse/gnome-shell-extensions/commit?id=8bad8a3b63d87 ...
Review of attachment 299734 [details] [review]: OK
Review of attachment 299734 [details] [review]: Meh, we're in freeze ...
Yeah, I had an old checkout Attachment 299734 [details] pushed as 903a3b2 - window-list: Fix WorkspaceIndicator's popup menu position
Thanks!