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 694276 - Drag of application icons is not cancelled when you open a popup menu
Drag of application icons is not cancelled when you open a popup menu
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-20 14:55 UTC by Giovanni Campagna
Modified: 2013-02-20 16:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
AppDisplay: use a ClickAction for the application buttons (6.77 KB, patch)
2013-02-20 14:56 UTC, Giovanni Campagna
none Details | Review
AppDisplay: fake a release event to dnd when opening the menu (1.95 KB, patch)
2013-02-20 15:57 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-02-20 14:55:19 UTC
If you open the popup menu with a long press and then close it, you'll see that the icon follows you, as if you were dragging it.
This happens because we start a drag on button-press, then install a grab to show the menu and thus dnd never sees the release event.
Comment 1 Giovanni Campagna 2013-02-20 14:56:24 UTC
Created attachment 236940 [details] [review]
AppDisplay: use a ClickAction for the application buttons

We want to handle long-press and drag for application icons, so ClickAction
is a better choice.

This was my first attempt. Technically the best choice, except that somehow
Clutter gets confused and stops delivery of enter and leave event after
you open the menu with a right click.
Comment 2 Giovanni Campagna 2013-02-20 15:57:33 UTC
Created attachment 236944 [details] [review]
AppDisplay: fake a release event to dnd when opening the menu

PopupMenuManager eats the next release event, which would otherwise close
the menu, so we need to tell dnd that we're handling it, and no drag should
be started, so it can ungrab the pointer and restore state.

This one is much better. It does what it promises, and has no visible
regressions.
Comment 3 Florian Müllner 2013-02-20 16:00:28 UTC
Review of attachment 236944 [details] [review]:

Untested (just taking a break from wading through commit logs ;-)), but looks correct to me.
Comment 4 Giovanni Campagna 2013-02-20 16:01:59 UTC
Attachment 236944 [details] pushed as a50ddd6 - AppDisplay: fake a release event to dnd when opening the menu