[gtk+] mir: keep reference on queued events



commit d37f94a524c7109cf1990eb864006111150f20fe
Author: William Hua <william hua canonical com>
Date:   Thu May 21 11:48:27 2015 -0500

    mir: keep reference on queued events

 gdk/mir/gdkmireventsource.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
index 5b55254..41a4422 100644
--- a/gdk/mir/gdkmireventsource.c
+++ b/gdk/mir/gdkmireventsource.c
@@ -540,6 +540,7 @@ static void
 gdk_mir_queued_event_free (GdkMirQueuedEvent *event)
 {
   _gdk_mir_window_reference_unref (event->window_ref);
+  mir_event_unref (event->event);
   g_slice_free (GdkMirQueuedEvent, event);
 }
 
@@ -724,7 +725,7 @@ _gdk_mir_event_source_queue (GdkMirWindowReference *window_ref,
   queued_event = g_slice_new (GdkMirQueuedEvent);
   g_atomic_int_inc (&window_ref->ref_count);
   queued_event->window_ref = window_ref;
-  queued_event->event = event;
+  queued_event->event = mir_event_ref (event);
 
   g_mutex_lock (&source->mir_event_lock);
   g_queue_push_tail (&source->mir_events, queued_event);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]