[gnome-games] aisleriot: Mask uncommon modifiers on button press modifiers check
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games] aisleriot: Mask uncommon modifiers on button press modifiers check
- Date: Thu, 10 Dec 2009 11:46:09 +0000 (UTC)
commit 3bd494b489ff837275d80e7a4d65feac0baea308
Author: Christian Persch <chpe gnome org>
Date: Thu Dec 10 12:44:54 2009 +0100
aisleriot: Mask uncommon modifiers on button press modifiers check
Bug #604226.
aisleriot/board.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/aisleriot/board.c b/aisleriot/board.c
index 6342008..0adee3d 100644
--- a/aisleriot/board.c
+++ b/aisleriot/board.c
@@ -68,6 +68,16 @@
#define STATIC_ASSERT_IMPL2(condition, line) typedef int _static_assert_line_##line[(condition) ? 1 : -1]
#define I_(string) g_intern_static_string (string)
+
+/* FIXMEchpe: file a bug to get an exported function like gtk_accelerator_get_default_mod_mask() for this? */
+/* Copied from clutter-binding-pool.c */
+#define CLUTTER_DEFAULT_MOD_MASK ((CLUTTER_SHIFT_MASK | \
+ CLUTTER_CONTROL_MASK | \
+ CLUTTER_MOD1_MASK | \
+ CLUTTER_SUPER_MASK | \
+ CLUTTER_HYPER_MASK | \
+ CLUTTER_META_MASK) | \
+ CLUTTER_RELEASE_MASK)
#pragma GCC poison GtkWidget
#pragma GCC poison widget
@@ -2699,7 +2709,7 @@ aisleriot_board_button_press (ClutterActor *actor,
/* Don't do anything if a modifier is pressed */
/* FIXMEchpe: is there anything like gtk_accelerator_get_default_mod_mask() in clutter? */
- state = event->modifier_state;
+ state = event->modifier_state & CLUTTER_DEFAULT_MOD_MASK;
if (state != 0)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]