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 144324 - Leaking dnd contexts with XDnD
Leaking dnd contexts with XDnD
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.4.x
Other Linux
: Normal normal
: Medium fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-06-14 12:22 UTC by Alexander Larsson
Modified: 2011-01-05 00:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes a leak when shortcuting XDnD events (737 bytes, patch)
2004-06-14 12:23 UTC, Alexander Larsson
none Details | Review

Description Alexander Larsson 2004-06-14 12:22:02 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.
Comment 1 Alexander Larsson 2004-06-14 12:23:56 UTC
Created attachment 28688 [details] [review]
Fixes a leak when shortcuting XDnD events
Comment 2 Matthias Clasen 2004-07-06 14:18:49 UTC
The real fix is probably to make the cache refcounted.
Comment 3 Matthias Clasen 2004-07-08 20:32:13 UTC
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.
Comment 4 Matthias Clasen 2004-07-09 14:31:04 UTC
To fix the larger problem, the caching has to be decoupled from the lifecycle of
the drag context. 
Comment 5 Matthias Clasen 2011-01-05 00:37:42 UTC
I've finally committed something that should fix the caching problem.