[gnome-shell/gnome-3-18] windowMenu: Ensure the source actor isn't sized 0x0



commit 4d066e3916b540e8c1bc218edf4b79320be8a1ac
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Oct 19 19:06:28 2015 +0200

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 7aa4591..5cd6802 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();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]