[gtk+] Replace references to sealed GdkDevice private variables with accessor calls in quartz.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Replace references to sealed GdkDevice private variables with accessor calls in quartz.
- Date: Wed, 24 Nov 2010 00:53:56 +0000 (UTC)
commit c0aae6644aedb16d71c9a480c5e89b0c7b58b7f7
Author: John Ralls <jralls ceridwen us>
Date: Tue Nov 23 16:52:24 2010 -0800
Replace references to sealed GdkDevice private variables with accessor calls in quartz.
gdk/quartz/gdkevents-quartz.c | 2 +-
gdk/quartz/gdkinput.c | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index c6512fc..44f10cb 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -571,7 +571,7 @@ find_toplevel_for_keyboard_event (NSEvent *nsevent)
GdkDeviceGrabInfo *grab;
GdkDevice *device = l->data;
- if (device->source != GDK_SOURCE_KEYBOARD)
+ if (gdk_device_get_source(device) != GDK_SOURCE_KEYBOARD)
continue;
grab = _gdk_display_get_last_device_grab (display, device);
diff --git a/gdk/quartz/gdkinput.c b/gdk/quartz/gdkinput.c
index c431fc4..31d1bd2 100644
--- a/gdk/quartz/gdkinput.c
+++ b/gdk/quartz/gdkinput.c
@@ -228,7 +228,7 @@ _gdk_input_init (void)
{
GdkDevice *device = l->data;
- if (device->source == GDK_SOURCE_KEYBOARD)
+ if (gdk_device_get_source(device) == GDK_SOURCE_KEYBOARD)
continue;
_gdk_input_devices = g_list_prepend (_gdk_input_devices, l->data);
@@ -245,7 +245,7 @@ _gdk_input_init (void)
{
GdkDevice *device = list->data;
- if (device->source != GDK_SOURCE_MOUSE)
+ if (gdk_device_get_source(device) != GDK_SOURCE_MOUSE)
continue;
_gdk_display->core_pointer = device;
@@ -273,11 +273,7 @@ _gdk_input_exit (void)
if (gdkdev != (GdkDevicePrivate *)_gdk_core_pointer)
{
gdk_device_set_mode ((GdkDevice *)gdkdev, GDK_MODE_DISABLED);
-
- g_free (gdkdev->info.name);
- g_free (gdkdev->info.axes);
- g_free (gdkdev->info.keys);
- g_free (gdkdev);
+ g_object_unref(gdkdev);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]