GNOME Bugzilla – Bug 144324
Leaking dnd contexts with XDnD
Last modified: 2011-01-05 00:37:42 UTC
Dragging using XDnD, for instance using testdnd, never frees the drag context created by the source. This causes bad problems, because it means the GdkWindowCache of the context is never freed, and its filter callbacks never unregistered. During a second drag we then never get the filter callbacks, because the first cache is still swallowing the XDnD events, resulting in the window cache not working. I'm not 100% sure about the solution, but I'm attaching a patch that i think fixes this in the correct way.
Created attachment 28688 [details] [review] Fixes a leak when shortcuting XDnD events
The real fix is probably to make the cache refcounted.
Committed the fix to stop drag contexts from leaking. The larger problem, as I understand now, is that it is legal for applications to keep references themselves, and in that case, things don't quite work.
To fix the larger problem, the caching has to be decoupled from the lifecycle of the drag context.
I've finally committed something that should fix the caching problem.