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 695161 - Overview thinks control key is pressed.
Overview thinks control key is pressed.
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 695385 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-03-04 22:47 UTC by darkxst
Modified: 2013-03-14 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
overview: Don't use a captured-event handler to detect the control key (2.05 KB, patch)
2013-03-04 22:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description darkxst 2013-03-04 22:47:25 UTC
Sometimes upon launching the overview, it seems to think that the control key is pressed (even though it isn’t) and as such get stuck in overview.

It is required to then press+release control key to clear this state, and be able to exit overview.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-03-04 22:54:32 UTC
Created attachment 238057 [details] [review]
overview: Don't use a captured-event handler to detect the control key

captured-event handlers are easily messed up by an earlier event
handler capturing the event. Instead, use the current Clutter event
and check for the state of that.
Comment 2 Ray Strode [halfline] 2013-03-05 16:41:12 UTC
Review of attachment 238057 [details] [review]:

do you know which captured-event handler is causing this particular problem?

::: js/ui/overview.js
@@ +573,3 @@
 
+        let event = Clutter.get_current_event();
+        if (event && (event.get_state() & Clutter.ModifierType.CONTROL_MASK) != 0)

event is going to be null or event.get_state() is going to be 0 in a lot of cases (say because hide() wasn't directly called from an event handler, or was called from the wrong kind of event).  Testing your patch, it doesn't block leaving the overview using the hotcorner anymore (maybe because that's handled with barriers instead of clutter motion events?).

That might be okay, but it's a change in behavior.  If the main goal is "keep overview open when control clicking launchers" then maybe the code should be more specifically in the launcher code.  If it's the goal is more general, and the control key is really supposed to be "pin the overview up not matter what" then this patch doesn't maintain that behavior.
Comment 3 Florian Müllner 2013-03-07 19:17:18 UTC
*** Bug 695385 has been marked as a duplicate of this bug. ***
Comment 4 Mantas Mikulėnas (grawity) 2013-03-07 19:39:39 UTC
How I usually reproduce this bug – copied from bug 695385 comment #1:

  1. Run `notify-send foo https://bugzilla.gnome.org/`
     A notification will be displayed.

  2. Hold Ctrl, click the link, release Ctrl

  3. While the notification is still visible, press Super

  4. Overview gets stuck.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-03-14 16:06:14 UTC
Attachment 238057 [details] pushed as b39e762 - overview: Don't use a captured-event handler to detect the control key