diff options
author | portix <portix@gmx.net> | 2012-03-04 12:14:23 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-03-04 12:14:23 +0100 |
commit | 0213a7c01755735581e4a13e7f94e23e0dc213e1 (patch) | |
tree | 0aae08f5b1f8b7bb7074b44251e06d26540702ab /src/dwb.h | |
parent | aff02c88361791db5a69905b99b0327933c52741 (diff) | |
download | dwb-0213a7c01755735581e4a13e7f94e23e0dc213e1.zip |
Clean all modifiers in CLEAN_STATE that are not used, fixes broken keyboard handling if the keyboard layout changes.
Diffstat (limited to 'src/dwb.h')
-rw-r--r-- | src/dwb.h | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -83,8 +83,15 @@ #define LENGTH(X) (sizeof(X)/sizeof(X[0])) #define GLENGTH(X) (sizeof(X)/g_array_get_element_size(X)) -#define CLEAN_STATE_WITH_SHIFT(X) (X->state & ~(GDK_LOCK_MASK) & ~(GDK_MOD2_MASK) &~(GDK_MOD3_MASK) & ~(GDK_MOD5_MASK) & ~(GDK_SUPER_MASK) & ~(GDK_HYPER_MASK) & ~(GDK_META_MASK)) -#define CLEAN_STATE(X) (CLEAN_STATE_WITH_SHIFT(X) & ~(GDK_SHIFT_MASK)) +//#define CLEAN_STATE_WITH_SHIFT(X) (X->state & ~(GDK_LOCK_MASK) & ~(GDK_MOD2_MASK) &~(GDK_MOD3_MASK) & ~(GDK_MOD5_MASK) & ~(GDK_SUPER_MASK) & ~(GDK_HYPER_MASK) & ~(GDK_META_MASK)) + +#define CLEAN_STATE_WITH_SHIFT(X) ((X)->state & (GDK_MOD1_MASK|GDK_MOD4_MASK|\ + GDK_BUTTON1_MASK|GDK_BUTTON2_MASK|GDK_BUTTON3_MASK|GDK_BUTTON4_MASK|GDK_BUTTON5_MASK|\ + GDK_SHIFT_MASK|GDK_CONTROL_MASK )) +//#define CLEAN_STATE(X) (CLEAN_STATE_WITH_SHIFT(X) & ~(GDK_SHIFT_MASK)) +#define CLEAN_STATE(X) ((X)->state & (GDK_MOD1_MASK|GDK_MOD4_MASK|\ + GDK_BUTTON1_MASK|GDK_BUTTON2_MASK|GDK_BUTTON3_MASK|GDK_BUTTON4_MASK|GDK_BUTTON5_MASK|\ + GDK_SHIFT_MASK|GDK_CONTROL_MASK )) #define CLEAN_SHIFT(X) (X->state & ~(GDK_SHIFT_MASK) & ~(GDK_LOCK_MASK)) #define CLEAN_COMP_MODE(X) (X & ~(COMPLETION_MODE) & ~(AUTO_COMPLETE)) #define CLEAN_MODE(mode) ((mode) & ~(COMPLETION_MODE)) |