GTK: filter events more precisely.
Turns out that GDK_MOD2_MASK, at least on some systems, corresponds to NumLock. Use the function provided by GDK to handle this. Fixes #634.pull/640/head
parent
a80a0337a5
commit
d238f985fb
|
@ -565,7 +565,8 @@ protected:
|
||||||
KeyboardEvent event = {};
|
KeyboardEvent event = {};
|
||||||
event.type = type;
|
event.type = type;
|
||||||
|
|
||||||
if(gdk_event->state & ~(GDK_SHIFT_MASK|GDK_CONTROL_MASK)) {
|
Gdk::ModifierType mod_mask = get_modifier_mask(Gdk::MODIFIER_INTENT_DEFAULT_MOD_MASK);
|
||||||
|
if((gdk_event->state & mod_mask) & ~(GDK_SHIFT_MASK|GDK_CONTROL_MASK)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue