From a8c87f3bab5a1d2ef2f177dbd30833ea86f38c1a Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 14 Mar 2013 11:34:09 -0400 Subject: [PATCH] overview: Only keep ourselves in the overview on button events This prevents using Control to quickly launch a new instance of an app in search results or with keyboard navigation. https://bugzilla.gnome.org/show_bug.cgi?id=695801 --- js/ui/overview.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index 4fdcd02a2..33cc478ab 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -572,8 +572,14 @@ const Overview = new Lang.Class({ return; let event = Clutter.get_current_event(); - if (event && (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0) - return; + if (event) { + let type = event.type(); + let button = (type == Clutter.EventType.BUTTON_PRESS || + type == Clutter.EventType.BUTTON_RELEASE); + let ctrl = (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0; + if (button && ctrl) + return; + } this._animateNotVisible();