From 9c74e223131a0a227aac84c9d027ab92acb19f6a Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Mon, 19 Oct 2015 19:06:28 +0200 Subject: [PATCH] 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. https://bugzilla.gnome.org/show_bug.cgi?id=756605 --- js/ui/windowMenu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js index 7aa45919b..5cd6802e6 100644 --- a/js/ui/windowMenu.js +++ b/js/ui/windowMenu.js @@ -214,7 +214,7 @@ const WindowMenuManager = new Lang.Class({ menu.close(); }); - this._sourceActor.set_size(rect.width, rect.height); + this._sourceActor.set_size(Math.max(1, rect.width), Math.max(1, rect.height)); this._sourceActor.set_position(rect.x, rect.y); this._sourceActor.show();