summaryrefslogtreecommitdiff
path: root/src/backends/x11
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-04-23 15:17:21 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-04-23 15:43:34 -0400
commit97074ccdadb5fab16e647a3f85519a6cf8972753 (patch)
treea98b4148c127318d8565040e27a09e7ecfbb16c3 /src/backends/x11
parent6111bb9dec88f134471653a90d993409db70d447 (diff)
downloadmutter-97074ccdadb5fab16e647a3f85519a6cf8972753.tar.gz
backend-x11: Fix leak of the event data
Diffstat (limited to 'src/backends/x11')
-rw-r--r--src/backends/x11/meta-backend-x11.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index 5e07d561d..d47c83de7 100644
--- a/src/backends/x11/meta-backend-x11.c
+++ b/src/backends/x11/meta-backend-x11.c
@@ -84,8 +84,6 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
if (event->type == GenericEvent &&
event->xcookie.extension == priv->xinput_opcode)
{
- XGetEventData (priv->xdisplay, &event->xcookie);
-
XIEvent *input_event = (XIEvent *) event->xcookie.data;
XIDeviceEvent *device_event = ((XIDeviceEvent *) input_event);
@@ -115,6 +113,8 @@ handle_host_xevent (MetaBackend *backend,
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
gboolean bypass_clutter = FALSE;
+ XGetEventData (priv->xdisplay, &event->xcookie);
+
if (event->type == (priv->xsync_event_base + XSyncAlarmNotify))
handle_alarm_notify (backend, event);
@@ -133,6 +133,8 @@ handle_host_xevent (MetaBackend *backend,
out:
if (!bypass_clutter)
clutter_x11_handle_event (event);
+
+ XFreeEventData (priv->xdisplay, &event->xcookie);
}
typedef struct {