[gtk+/saved/mir: 38/47] Unref window when pointer object is finalized
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/saved/mir: 38/47] Unref window when pointer object is finalized
- Date: Wed, 22 Oct 2014 16:23:03 +0000 (UTC)
commit 85ab2f69ccb2664bfae4aa9297d6d57fa135466f
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Jun 9 14:00:42 2014 +1200
Unref window when pointer object is finalized
gdk/mir/gdkmirpointer.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gdk/mir/gdkmirpointer.c b/gdk/mir/gdkmirpointer.c
index c249f9c..96c7e74 100644
--- a/gdk/mir/gdkmirpointer.c
+++ b/gdk/mir/gdkmirpointer.c
@@ -220,10 +220,24 @@ gdk_mir_pointer_init (GdkMirPointer *device)
}
static void
+gdk_mir_pointer_finalize (GObject *object)
+{
+ GdkMirPointer *p = GDK_MIR_POINTER (object);
+
+ if (p->over_window)
+ g_object_unref (p->over_window);
+
+ G_OBJECT_CLASS (gdk_mir_pointer_parent_class)->finalize (object);
+}
+
+static void
gdk_mir_pointer_class_init (GdkMirPointerClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
+ object_class->finalize = gdk_mir_pointer_finalize;
+
device_class->get_history = gdk_mir_pointer_get_history;
device_class->get_state = gdk_mir_pointer_get_state;
device_class->set_window_cursor = gdk_mir_pointer_set_window_cursor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]