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 654656 - Improve XGenericEventCookie allocation wrt other toolkits
Improve XGenericEventCookie allocation wrt other toolkits
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: x11
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-14 23:31 UTC by Carlos Garnacho
Modified: 2011-07-15 12:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (5.36 KB, patch)
2011-07-14 23:31 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2011-07-14 23:31:12 UTC
Created attachment 192010 [details] [review]
patch

Right now, Clutter tries to allocate/free every XGenericEvent that gets through its ClutterDeviceManagerXI2, this unfortunately doesn't play well if both GTK+ and Clutter are to handle X Events in the same application, as the cookie data can be allocated just once for each cookie event, so it needs to persist throughout all handlers.

I'm attaching a patch that improves the allocation schema, so it is only guaranteed to allocate the cookie when clutter gets the event itself via XNextEvent(), and only frees a cookie that it has allocated itself.
Comment 1 Emmanuele Bassi (:ebassi) 2011-07-15 09:08:12 UTC
Review of attachment 192010 [details] [review]:

the patch looks okay to me. typo alert in the commit message: "hipothetically" instead of "hypothetically". :-)
Comment 2 Carlos Garnacho 2011-07-15 12:18:20 UTC
Typo fixed and pushed :)