From 92e5d2b8f55e7b8b4491172dd79654612d552498 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 23 Apr 2013 16:39:29 -0400 Subject: [PATCH] backgroundMenu: Ignore releases when using long-press Otherwise, a release from the long-press will be seen as a button event that should close the menu. https://bugzilla.gnome.org/show_bug.cgi?id=697203 --- js/ui/backgroundMenu.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index 1328b3f89..06e698ca7 100644 --- a/js/ui/backgroundMenu.js +++ b/js/ui/backgroundMenu.js @@ -46,8 +46,10 @@ function addBackgroundMenu(actor) { clickAction.connect('long-press', function(action, actor, state) { if (state == Clutter.LongPressState.QUERY) return action.get_button() == 1 && !actor._backgroundMenu.isOpen; - if (state == Clutter.LongPressState.ACTIVATE) + if (state == Clutter.LongPressState.ACTIVATE) { openMenu(); + actor._backgroundManager.ignoreRelease(); + } return true; }); clickAction.connect('clicked', function(action) {