aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Keys.cc')
-rw-r--r--src/Keys.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index d85c696..76224ef 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -23,6 +23,8 @@
23 23
24#include "fluxbox.hh" 24#include "fluxbox.hh"
25#include "Screen.hh" 25#include "Screen.hh"
26#include "WinClient.hh"
27#include "WindowCmd.hh"
26 28
27#include "FbTk/EventManager.hh" 29#include "FbTk/EventManager.hh"
28#include "FbTk/StringUtil.hh" 30#include "FbTk/StringUtil.hh"
@@ -480,7 +482,7 @@ bool Keys::addBinding(const string &linebuffer) {
480 482
481// return true if bound to a command, else false 483// return true if bound to a command, else false
482bool Keys::doAction(int type, unsigned int mods, unsigned int key, 484bool Keys::doAction(int type, unsigned int mods, unsigned int key,
483 int context, Time time) { 485 int context, WinClient *current, Time time) {
484 486
485 static Time last_button_time = 0; 487 static Time last_button_time = 0;
486 static unsigned int last_button = 0; 488 static unsigned int last_button = 0;
@@ -546,7 +548,11 @@ bool Keys::doAction(int type, unsigned int mods, unsigned int key,
546 return false; 548 return false;
547 } 549 }
548 550
551 WinClient *old = WindowCmd<void>::client();
552 WindowCmd<void>::setClient(current);
549 temp_key->m_command->execute(); 553 temp_key->m_command->execute();
554 WindowCmd<void>::setClient(old);
555
550 if (saved_keymode) { 556 if (saved_keymode) {
551 if (next_key == m_keylist) // don't reset keymode if command changed it 557 if (next_key == m_keylist) // don't reset keymode if command changed it
552 setKeyMode(saved_keymode); 558 setKeyMode(saved_keymode);