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 700877 - pressing Super while dragging an icon from the applications view leaves the icon around
pressing Super while dragging an icon from the applications view leaves the i...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-23 09:55 UTC by Tomeu Vizoso
Modified: 2013-06-05 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dnd: Use pushModal() to grab the keyboard (1.59 KB, patch)
2013-05-23 14:29 UTC, Florian Müllner
needs-work Details | Review
WIP: Cancel any ongoing drag when the overview is hidden (741 bytes, text/plain)
2013-05-23 15:26 UTC, Tomeu Vizoso
  Details
dnd: Use pushModal() to grab the keyboard (1.70 KB, patch)
2013-06-05 14:43 UTC, Florian Müllner
committed Details | Review

Description Tomeu Vizoso 2013-05-23 09:55:27 UTC
Steps to reproduce:

1. Go to the Overview
2. Go to the Applications View
3. Start dragging an icon around (don't release the pointer button)
4. Press Super key

What should happen:

Drag is cancelled, dragged icon isn't visible anymore

What currently happens:

Icon is left at the point where the pointer was when the Super key was pressed
Comment 1 Florian Müllner 2013-05-23 14:29:36 UTC
Created attachment 245138 [details] [review]
dnd: Use pushModal() to grab the keyboard

Currently we "only" grab the keyboard when starting a drag operation,
which does not impede keybindings to be processed. This is at best
not harmful (like workspace switching), but may have unintended effects
otherwise - for instance, the hot corner is disabled, so having the
corresponding keyboard shortcut still active is fairly odd (not to
mention that it leaves the system in a confused state).
Fix this by switching to pushModal()/popModal(), which will push a
dedicated keybinding mode for us.
Comment 2 Tomeu Vizoso 2013-05-23 14:35:01 UTC
(In reply to comment #1)
> Created an attachment (id=245138) [details] [review]
> dnd: Use pushModal() to grab the keyboard

Works great here (though instead of cancelling the drag, the keybinding is ignored, which is fine).
Comment 3 Florian Müllner 2013-05-23 14:53:52 UTC
(In reply to comment #2)
> (though instead of cancelling the drag, the keybinding is ignored, which is 
> fine).

Yeah, I'm not really comfortable to deal with any keybindings that might go wrong on a case-by-case basis (lock screen etc.). In fact, the only keybinding that I can think of that genuinely would still make sense are the screenshot ones - those are disabled by the patch as well, though we could fix it easily by adding an explicit DRAG_OPERATION mode if deemed important.
Comment 4 Tomeu Vizoso 2013-05-23 15:26:24 UTC
Created attachment 245150 [details]
WIP: Cancel any ongoing drag when the overview is hidden

Just to illustrate another possibility.
Comment 5 Matthias Clasen 2013-05-24 10:12:16 UTC
Ignoring all key bindings while a drag is active will break power user features such as switching workspaces or using alt-tab during dnd ?

If true, don't think thats acceptable. It'll get us another round of 'you removed my favourite feature' cries.
Comment 6 Florian Müllner 2013-05-24 10:26:13 UTC
(In reply to comment #5)
> Ignoring all key bindings while a drag is active will break power user features
> such as switching workspaces or using alt-tab during dnd ?

Yes, though we could use a dedicated keybinding mode to allow some keybindings. Note however that we are strictly talking about dnd in the shell, e.g. extensions aside, it's an overview-only change - alt-tab is already disabled there anyway, and I'd argue that dropping on the workspace switcher is easier than fiddling with keybindings during the operation.
Comment 7 Matthias Clasen 2013-05-24 21:33:19 UTC
(In reply to comment #6)
> (In reply to comment #5)

> Note however that we are strictly talking about dnd in the shell, e.g.
> extensions aside, it's an overview-only change - alt-tab is already disabled
> there anyway, and I'd argue that dropping on the workspace switcher is easier
> than fiddling with keybindings during the operation.

Ah, ok. Ignore my comment then. It is probably correct to prevent application drags in the overview from escaping out of the overview. Just keep keynav working for people wanting to drag links from their browser to their email client, etc.
Comment 8 Rui Matos 2013-06-05 12:56:47 UTC
Review of attachment 245138 [details] [review]:

::: js/ui/dnd.js
@@ +149,3 @@
         if (!this._eventsGrabbed) {
             Clutter.grab_pointer(_getEventHandlerActor());
+            this._eventsGrabbed = Main.pushModal(_getEventHandlerActor());

I can't think how this could fail right now, but if it does then a call to _ungraEvents() won't undo the clutter pointer grab. I'd conditionalize the Clutter.grab_pointer() here on the success of pushModal().
Comment 9 Florian Müllner 2013-06-05 14:43:22 UTC
Created attachment 246080 [details] [review]
dnd: Use pushModal() to grab the keyboard

Can't think of anything concrete that might go wrong either (e.g. all situations where pushModal() may fail should prevent DND), but sure, nothing wrong with playing it safe ...
Comment 10 Rui Matos 2013-06-05 15:31:31 UTC
Review of attachment 246080 [details] [review]:

ok
Comment 11 Florian Müllner 2013-06-05 15:33:25 UTC
Attachment 246080 [details] pushed as 9e56e66 - dnd: Use pushModal() to grab the keyboard