aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2016-08-28 18:21:23 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2016-08-30 20:02:59 (GMT)
commit8a6623040ea543f20712dbcb1ed2f9456118961c (patch)
treec4198d02ec45c107252818ad7b1bf57158966522 /src
parentbb013f5c75120df0f86a7a17cbae61bdca2618f4 (diff)
downloadfluxbox-8a6623040ea543f20712dbcb1ed2f9456118961c.zip
fluxbox-8a6623040ea543f20712dbcb1ed2f9456118961c.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/Keys.cc4
1 files changed, 4 insertions, 0 deletions
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,
555 if (!temp_key && isdouble) 555 if (!temp_key && isdouble)
556 temp_key = next_key->find(type, mods, key, context, false); 556 temp_key = next_key->find(type, mods, key, context, false);
557 557
558 if (!temp_key && type == ButtonPress && // unassigned button press
559 next_key->find(MotionNotify, mods, key, context, false))
560 return true; // if there's a motion action, prevent replay to the client (but do nothing)
561
558 if (temp_key && !temp_key->keylist.empty()) { // emacs-style 562 if (temp_key && !temp_key->keylist.empty()) { // emacs-style
559 if (!saved_keymode) 563 if (!saved_keymode)
560 saved_keymode = m_keylist; 564 saved_keymode = m_keylist;