[gtk+/xi2] GdkDeviceXI2: Use XIMaskIsSet() for button state mask as well.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2] GdkDeviceXI2: Use XIMaskIsSet() for button state mask as well.
- Date: Sat, 31 Oct 2009 20:52:55 +0000 (UTC)
commit 5204b5ec246ab09905a8e68a2419dc409d167250
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Oct 30 18:00:17 2009 +0100
GdkDeviceXI2: Use XIMaskIsSet() for button state mask as well.
Pointed out by Peter Hutterer.
gdk/x11/gdkdevice-xi2.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 1d5e84e..731c71f 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -22,7 +22,6 @@
#include "gdkintl.h"
#include "gdkx.h"
-#define BIT_IS_ON(ptr, bit) (((unsigned char *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
#define GDK_DEVICE_XI2_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDK_TYPE_DEVICE_XI2, GdkDeviceXI2Private))
typedef struct GdkDeviceXI2Private GdkDeviceXI2Private;
@@ -532,7 +531,7 @@ gdk_device_xi2_translate_state (XIModifierState *mods_state,
for (i = 0; i < len; i++)
{
- if (!BIT_IS_ON (buttons_state->mask, i))
+ if (!XIMaskIsSet (buttons_state->mask, i))
continue;
switch (i)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]