GNOME Bugzilla – Bug 728183
Drag and drop (GdkFrameClock) does not work for hidden widgets
Last modified: 2014-04-24 19:37:10 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.
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.
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.
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.