[gtk+/gdk-backend] x11: Use public API to access cursor's xcursor
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend] x11: Use public API to access cursor's xcursor
- Date: Mon, 20 Dec 2010 13:14:17 +0000 (UTC)
commit 437cb7f32389668e011793645c0be398f7a6f778
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 20 01:56:07 2010 +0100
x11: Use public API to access cursor's xcursor
gdk/x11/gdkdevice-core.c | 7 ++-----
gdk/x11/gdkdevice-xi2.c | 7 ++-----
2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index 6dbe9f9..e176f91 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -200,15 +200,12 @@ gdk_device_core_set_window_cursor (GdkDevice *device,
GdkWindow *window,
GdkCursor *cursor)
{
- GdkCursorPrivate *cursor_private;
Cursor xcursor;
- cursor_private = (GdkCursorPrivate*) cursor;
-
if (!cursor)
xcursor = None;
else
- xcursor = cursor_private->xcursor;
+ xcursor = gdk_x11_cursor_get_xcursor (cursor);
XDefineCursor (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
@@ -362,7 +359,7 @@ gdk_device_core_grab (GdkDevice *device,
else
{
_gdk_x11_cursor_update_theme (cursor);
- xcursor = ((GdkCursorPrivate *) cursor)->xcursor;
+ xcursor = gdk_x11_cursor_get_xcursor (cursor);
}
xevent_mask = 0;
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index df7ae1f..4eca8f1 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -245,7 +245,6 @@ gdk_device_xi2_set_window_cursor (GdkDevice *device,
GdkCursor *cursor)
{
GdkDeviceXI2Private *priv;
- GdkCursorPrivate *cursor_private;
priv = GDK_DEVICE_XI2 (device)->priv;
@@ -255,12 +254,10 @@ gdk_device_xi2_set_window_cursor (GdkDevice *device,
if (cursor)
{
- cursor_private = (GdkCursorPrivate*) cursor;
-
XIDefineCursor (GDK_WINDOW_XDISPLAY (window),
priv->device_id,
GDK_WINDOW_XID (window),
- cursor_private->xcursor);
+ gdk_x11_cursor_get_xcursor (cursor));
}
else
XIUndefineCursor (GDK_WINDOW_XDISPLAY (window),
@@ -408,7 +405,7 @@ gdk_device_xi2_grab (GdkDevice *device,
else
{
_gdk_x11_cursor_update_theme (cursor);
- xcursor = ((GdkCursorPrivate *) cursor)->xcursor;
+ xcursor = gdk_x11_cursor_get_xcursor (cursor);
}
mask.deviceid = priv->device_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]