! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Applications menu drop down is centred under button instead of left aligned
Applications Menu


Description Alistair Buxton 2018-10-27 21:20:24 CEST
Created attachment 8065 

See screenshot. The menu displayed by the applications menu plugin is incorrectly positioned. Instead of being aligned to the left of the plugin button it is centred. This is difficult to notice in default configurations because the menu will never move off screen. In default configurations the application menu is typically the first item on the panel and so there is almost no room for it to move to the left. But it does still happen.

This only affects the application menu plugin. For example the places plugin, which looks very similar, is not affected.
Comment 1 Alistair Buxton 2018-10-27 21:21:42 CEST
Created attachment 8066 
screenshot showing effect when menu is close to the edge of the screen
Comment 2 Simon Steinbeiss editbugs 2018-11-09 01:22:09 CET
Several other plugins, some of which should have some logic to take care of this problem, also seem affected.
Comment 3 Alistair Buxton 2018-11-29 09:53:51 CET
Created attachment 8137 
vertical lay out
Comment 4 Alistair Buxton 2018-11-29 09:56:47 CET
Created attachment 8138 
horizontal layout

Comment 5 Alistair Buxton 2018-11-29 10:05:20 CET
So the code you linked in the notification plugin explicitly defines the behaviour described in this bug.

1. If the panel is vertical, align the widget's western anchor with the menu's eastern anchor. Results in this happening:

2. Otherwise align the widget's northern anchor with the menu's southern anchor. Results in this happening:

The behaviour should probably actually be:

1. If the panel is vertical, align the widget's north (east) anchor with the menu's north (west) anchor.
2. Otherwise align the widget's (south) west anchor with the menu's (north) west anchor.

The directions in brackets change depending whether the panel is on the top/bottom left/right screen edge. They can probably be left out entirely as the panel struts will force the menu onto the correct side, as long as the panel reserves space.
Comment 6 Alistair Buxton 2018-11-29 10:28:08 CET
The same anti-pattern seems to have been copy-pasted all over the place, always inside the gtk 3.22 checks. In other places the logic is different. Lots of different versions and I am not sure why. None of them actually seem to be right.
Comment 7 Git Bot editbugs 2018-12-03 00:00:01 CET
Alistair Buxton referenced this bugreport in commit 0dba5bc9cfd35fe35e9d7acb5791b08b8e38cece

Fix anchors for gtk_menu_popup_at_widget


Bug #14803

Reported by:
Alistair Buxton
Reported on: 2018-10-27
Last modified on: 2018-12-03


Nick Schermer
CC List:
1 user




screenshot (50.78 KB, image/png)
2018-10-27 21:20 CEST , Alistair Buxton
no flags
screenshot showing effect when menu is close to the edge of the screen (72.22 KB, image/png)
2018-10-27 21:21 CEST , Alistair Buxton
no flags
vertical lay out (55.33 KB, image/png)
2018-11-29 09:53 CET , Alistair Buxton
no flags
horizontal layout (67.53 KB, image/png)
2018-11-29 09:56 CET , Alistair Buxton
no flags

Additional information