After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746365 - boxpointer: Fix arrow side computation on secondary monitors
boxpointer: Fix arrow side computation on secondary monitors
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-17 20:15 UTC by Sylvain Pasche
Modified: 2015-03-24 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
boxpointer: Fix arrow side computation on secondary monitors (1.27 KB, patch)
2015-03-17 20:16 UTC, Sylvain Pasche
none Details | Review
boxpointer: Fix arrow side computation on secondary monitors (1.11 KB, patch)
2015-03-17 20:19 UTC, Sylvain Pasche
rejected Details | Review
window-list: Fix WorkspaceIndicator's popup menu position (1.26 KB, patch)
2015-03-18 17:32 UTC, Rui Matos
committed Details | Review
window-list: Remove the panel-menu style from WorkspaceIndicator (1.33 KB, patch)
2015-03-18 17:32 UTC, Rui Matos
rejected Details | Review

Description Sylvain Pasche 2015-03-17 20:15:54 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().
Comment 1 Sylvain Pasche 2015-03-17 20:16:37 UTC
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.
Comment 2 Sylvain Pasche 2015-03-17 20:19:29 UTC
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.
Comment 3 Rui Matos 2015-03-18 17:31:44 UTC
Review of attachment 299631 [details] [review]:

This isn't the problem, see the patch I'm attaching
Comment 4 Rui Matos 2015-03-18 17:32:36 UTC
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.
Comment 5 Rui Matos 2015-03-18 17:32:47 UTC
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.
Comment 6 Florian Müllner 2015-03-18 17:35:29 UTC
(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 ...
Comment 7 Florian Müllner 2015-03-18 17:36:58 UTC
Review of attachment 299734 [details] [review]:

OK
Comment 8 Florian Müllner 2015-03-18 17:37:19 UTC
Review of attachment 299734 [details] [review]:

Meh, we're in freeze ...
Comment 9 Rui Matos 2015-03-24 12:05:12 UTC
Yeah, I had an old checkout

Attachment 299734 [details] pushed as 903a3b2 - window-list: Fix WorkspaceIndicator's popup menu position
Comment 10 Sylvain Pasche 2015-03-24 12:26:04 UTC
Thanks!