Don't replay presses which are required f/ motions

When trying to doAction(ButtonPress, ...), we check whether the
action would hit for type==MotionNotify.
In this case we do nothing but return "true" to tell the caller that
this event is "for us". Otherwise the event would be replayed to the
client and there'd go out MotionNotify grabs.

tl;du: This fixes MoveX actions.
This commit is contained in:
Thomas Lübking 2016-08-28 20:21:23 +02:00
parent bb013f5c75
commit 8a6623040e

View file

@ -555,6 +555,10 @@ bool Keys::doAction(int type, unsigned int mods, unsigned int key,
if (!temp_key && isdouble)
temp_key = next_key->find(type, mods, key, context, false);
if (!temp_key && type == ButtonPress && // unassigned button press
next_key->find(MotionNotify, mods, key, context, false))
return true; // if there's a motion action, prevent replay to the client (but do nothing)
if (temp_key && !temp_key->keylist.empty()) { // emacs-style
if (!saved_keymode)
saved_keymode = m_keylist;