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 728183 - Drag and drop (GdkFrameClock) does not work for hidden widgets
Drag and drop (GdkFrameClock) does not work for hidden widgets
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-04-14 14:09 UTC by Martin Stransky
Modified: 2014-04-24 19:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (1.01 KB, text/plain)
2014-04-14 14:09 UTC, Martin Stransky
  Details
DND: go back to a timeout for cancel animation (2.37 KB, patch)
2014-04-15 00:14 UTC, Matthias Clasen
none Details | Review

Description Martin Stransky 2014-04-14 14:09:23 UTC
Created attachment 274274 [details]
testcase

See https://bugzilla.mozilla.org/show_bug.cgi?id=983843#c7

The drag&drop operation works only when the d&d widget is visible. 

gtk_drag_drop_finished() calls gtk_widget_add_tick_callback() which is supposed to perform drag chancel animation and clean the d&d icon.

But gtk_widget_add_tick_callback() does not launch the timer when the d&d widget is not actually visible (minimized for instance).

gtk_widget_add_tick_callback() utilizes GdkFrameClock for the animation which is supposed to run on realised widgets. But the widget has to be actually visible, but just realised.

This is a regression in the d&d code in Fedora 20, Fedora 19 uses gdk_threads_add_timeout() for the d&d animations.
Comment 1 Matthias Clasen 2014-04-14 23:47:32 UTC
Using a tick callback for this probably does not make sense, indeed. We are not drawing inside the window, but moving a toplevel around... We should just go back to using a timeout here. It can have the same frequency as the tick callback would.
Comment 2 Matthias Clasen 2014-04-15 00:14:36 UTC
Created attachment 274321 [details] [review]
DND: go back to a timeout for cancel animation

Using a tick callback does not really make sense here, since we
are not drawing in a window, but moving a toplevel around.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-04-24 19:37:10 UTC
The frame clock and moving windows should work fine; that's what it was originally designed for!

I have no idea why you would start DND on a hidden widget or what that would even mean.