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 756605 - Contextual window menu immediately disappear in top orientation
Contextual window menu immediately disappear in top orientation
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: window-management
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-15 00:17 UTC by Lionel Landwerlin
Modified: 2015-10-20 13:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
windowMenu: Ensure the source actor isn't sized 0x0 (1.63 KB, patch)
2015-10-19 17:13 UTC, Rui Matos
none Details | Review
windowMenu: Ensure the source actor isn't sized 0x0 (1.20 KB, patch)
2015-10-19 17:27 UTC, Rui Matos
committed Details | Review

Description Lionel Landwerlin 2015-10-15 00:17:07 UTC
You can press the Meta key and click the right button of the mouse on a window to get its contextual menu.
In the case the menu is positioned on top of the cursor, the menu will show up and disappear immediately.

Hopefully the window show the issue : https://www.youtube.com/watch?v=y8rCmOHohFY
Comment 1 Rui Matos 2015-10-19 17:13:58 UTC
Created attachment 313681 [details] [review]
windowMenu: Ensure the source actor isn't sized 0x0

If the source actor is sized 0x0, the grabHelper will close the menu
on button release if the menu ends up flipped because in that case the
release event happens when the pointer is neither over the source
actor (since it's 0x0) or over the menu actor. A zero sized source
actor works for the non-flipped menu case because the menu's actor
itself ends up underneath the pointer.
Comment 2 Florian Müllner 2015-10-19 17:18:05 UTC
Review of attachment 313681 [details] [review]:

OK
Comment 3 Florian Müllner 2015-10-19 17:18:58 UTC
Review of attachment 313681 [details] [review]:

::: js/ui/windowMenu.js
@@ -215,3 @@
             });
 
-        this._sourceActor.set_size(rect.width, rect.height);

Or wait - the rect can be bigger than 1x1 in the apps-menu-in-titlebar case
Comment 4 Rui Matos 2015-10-19 17:27:38 UTC
Created attachment 313685 [details] [review]
windowMenu: Ensure the source actor isn't sized 0x0

--

Aye, didn't notice that case
Comment 5 Florian Müllner 2015-10-19 17:43:55 UTC
Review of attachment 313685 [details] [review]:

LGTM
Comment 6 Rui Matos 2015-10-20 13:12:09 UTC
Attachment 313685 [details] pushed as 9c74e22 - windowMenu: Ensure the source actor isn't sized 0x0