GNOME Bugzilla – Bug 694276
Drag of application icons is not cancelled when you open a popup menu
Last modified: 2013-02-20 16:02:03 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.
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.
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.
Review of attachment 236944 [details] [review]: Untested (just taking a break from wading through commit logs ;-)), but looks correct to me.
Attachment 236944 [details] pushed as a50ddd6 - AppDisplay: fake a release event to dnd when opening the menu