From 8a6623040ea543f20712dbcb1ed2f9456118961c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= <thomas.luebking@gmail.com> Date: Sun, 28 Aug 2016 20:21:23 +0200 Subject: 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. --- src/Keys.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Keys.cc b/src/Keys.cc index 31f1722..1e66463 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -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; -- cgit v0.11.2