[gtk+/gdk-backend-quartz: 9/29] Adapt quartz device code to new ways
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend-quartz: 9/29] Adapt quartz device code to new ways
- Date: Wed, 22 Dec 2010 02:31:46 +0000 (UTC)
commit d957b6a84febd86e0363f33e4e63cff36b3de3a9
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 17 11:19:37 2010 -0500
Adapt quartz device code to new ways
We will need to rename the Core implementations in X11/Quartz
to not clash, later.
gdk/quartz/gdkdevice-core.c | 9 ++++++-
gdk/quartz/gdkdevicemanager-core.h | 2 +-
gdk/quartz/gdkevents-quartz.c | 43 ------------------------------------
gdk/quartz/gdkinput.c | 2 +-
gdk/quartz/gdkprivate-quartz.h | 2 +
5 files changed, 12 insertions(+), 46 deletions(-)
---
diff --git a/gdk/quartz/gdkdevice-core.c b/gdk/quartz/gdkdevice-core.c
index 25f9a1e..9e83d5f 100644
--- a/gdk/quartz/gdkdevice-core.c
+++ b/gdk/quartz/gdkdevice-core.c
@@ -86,6 +86,7 @@ gdk_device_core_class_init (GdkDeviceCoreClass *klass)
device_class->ungrab = gdk_device_core_ungrab;
device_class->window_at_position = gdk_device_core_window_at_position;
device_class->select_window_events = gdk_device_core_select_window_events;
+ device_class->check_extension_events = _gdk_quartz_device_check_extension_events;
}
static void
@@ -303,7 +304,13 @@ static void
gdk_device_core_ungrab (GdkDevice *device,
guint32 time_)
{
- /* Should remain empty */
+ GdkDeviceGrabInfo *grab;
+
+ grab = _gdk_display_get_last_device_grab (_gdk_display, device);
+ if (grab)
+ grab->serial_end = 0;
+
+ _gdk_display_device_grab_update (_gdk_display, device, 0);
}
static GdkWindow *
diff --git a/gdk/quartz/gdkdevicemanager-core.h b/gdk/quartz/gdkdevicemanager-core.h
index 0a337fc..f3917a3 100644
--- a/gdk/quartz/gdkdevicemanager-core.h
+++ b/gdk/quartz/gdkdevicemanager-core.h
@@ -20,7 +20,7 @@
#ifndef __GDK_DEVICE_MANAGER_CORE_H__
#define __GDK_DEVICE_MANAGER_CORE_H__
-#include <gdk/gdkdevicemanager.h>
+#include <gdk/gdkdevicemanagerprivate.h>
G_BEGIN_DECLS
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 48577e2..83f6b7a 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -74,49 +74,6 @@ gdk_events_pending (void)
(_gdk_quartz_event_loop_check_pending ()));
}
-void
-gdk_device_ungrab (GdkDevice *device,
- guint32 time_)
-{
- GdkDeviceGrabInfo *grab;
-
- grab = _gdk_display_get_last_device_grab (_gdk_display, device);
- if (grab)
- grab->serial_end = 0;
-
- _gdk_display_device_grab_update (_gdk_display, device, 0);
-}
-
-GdkGrabStatus
-_gdk_windowing_device_grab (GdkDevice *device,
- GdkWindow *window,
- GdkWindow *native,
- gboolean owner_events,
- GdkEventMask event_mask,
- GdkWindow *confine_to,
- GdkCursor *cursor,
- guint32 time)
-{
- g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
- g_return_val_if_fail (confine_to == NULL || GDK_IS_WINDOW (confine_to), 0);
-
- if (!window || GDK_WINDOW_DESTROYED (window))
- return GDK_GRAB_NOT_VIEWABLE;
-
- _gdk_display_add_device_grab (_gdk_display,
- device,
- window,
- native,
- GDK_OWNERSHIP_NONE,
- owner_events,
- event_mask,
- 0,
- time,
- FALSE);
-
- return GDK_GRAB_SUCCESS;
-}
-
static void
break_all_grabs (guint32 time)
{
diff --git a/gdk/quartz/gdkinput.c b/gdk/quartz/gdkinput.c
index bbd9291..fc7d73f 100644
--- a/gdk/quartz/gdkinput.c
+++ b/gdk/quartz/gdkinput.c
@@ -199,7 +199,7 @@ _gdk_input_window_destroy (GdkWindow *window)
}
void
-_gdk_input_check_extension_events (GdkDevice *device)
+_gdk_quartz_device_check_extension_events (GdkDevice *device)
{
}
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 0608d4e..890e10c 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -195,5 +195,7 @@ gboolean _gdk_quartz_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value);
+void _gdk_quartz_device_check_extension_events (GdkDevice *device);
+
#endif /* __GDK_PRIVATE_QUARTZ_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]