[gtk+/xi2: 1234/1239] Make gdk_event_get_device() return device for proximity events.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 1234/1239] Make gdk_event_get_device() return device for proximity events.
- Date: Tue, 29 Sep 2009 11:00:15 +0000 (UTC)
commit 35c099dd45ab47121604129fdb6bc4a386246cdd
Author: Carlos Garnacho <carlos gnome org>
Date: Mon Sep 28 21:30:24 2009 +0200
Make gdk_event_get_device() return device for proximity events.
gdk/gdkevents.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 80a621b..b57874b 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -933,24 +933,27 @@ gdk_event_get_device (const GdkEvent *event)
switch (event->type)
{
case GDK_MOTION_NOTIFY:
- return ((GdkEventMotion *) event)->device;
+ return event->motion.device;
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
- return ((GdkEventButton *) event)->device;
+ return event->button.device;
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
- return ((GdkEventKey *) event)->device;
+ return event->key.device;
case GDK_FOCUS_CHANGE:
- return ((GdkEventFocus *) event)->device;
+ return event->focus_change.device;
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
- return ((GdkEventCrossing *) event)->device;
+ return event->crossing.device;
case GDK_SCROLL:
- return ((GdkEventScroll *) event)->device;
+ return event->scroll.device;
case GDK_GRAB_BROKEN:
- return ((GdkEventGrabBroken *) event)->device;
+ return event->grab_broken.device;
+ case GDK_PROXIMITY_IN:
+ case GDK_PROXIMITY_OUT:
+ return event->proximity.device;
default:
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]