[gtk+/xi2] GdkDeviceXI: XCloseDevice() on dispose.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] GdkDeviceXI: XCloseDevice() on dispose.
- Date: Mon, 19 Oct 2009 14:30:20 +0000 (UTC)
commit f4dc9e48a1bcb7f510fc6a83e901692e700b0060
Author: Carlos Garnacho <carlos gnome org>
Date: Sun Oct 11 03:26:02 2009 +0200
GdkDeviceXI: XCloseDevice() on dispose.
gdk/x11/gdkdevice-xi.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi.c b/gdk/x11/gdkdevice-xi.c
index d87db61..2fe4ae2 100644
--- a/gdk/x11/gdkdevice-xi.c
+++ b/gdk/x11/gdkdevice-xi.c
@@ -109,6 +109,7 @@ gdk_device_xi_class_init (GdkDeviceXIClass *klass)
object_class->constructed = gdk_device_xi_constructed;
object_class->set_property = gdk_device_xi_set_property;
object_class->get_property = gdk_device_xi_get_property;
+ object_class->dispose = gdk_device_xi_dispose;
device_class->get_history = gdk_device_xi_get_history;
device_class->get_state = gdk_device_xi_get_state;
@@ -192,6 +193,24 @@ gdk_device_xi_get_property (GObject *object,
}
}
+static void
+gdk_device_xi_dispose (GObject *object)
+{
+ GdkDeviceXI *device_xi;
+ GdkDisplay *display;
+
+ device_xi = GDK_DEVICE_XI (object);
+ display = gdk_device_get_display (GDK_DEVICE (device_xi));
+
+ if (device_xi->xdevice)
+ {
+ XCloseDevice (GDK_DISPLAY_XDISPLAY (display), device_xi->xdevice);
+ device_xi->xdevice = NULL;
+ }
+
+ G_OBJECT_CLASS (gdk_device_xi_parent_class)->dispose (object);
+}
+
static GdkTimeCoord **
allocate_history (GdkDevice *device,
gint n_events)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]