aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-10-15 18:05:28 (GMT)
committermarkt <markt>2007-10-15 18:05:28 (GMT)
commit72130f350ef08c6200d18e544b861940cbcb7526 (patch)
treee2f789548a7e675ecb12cb2f5cda62e22552cde2 /src/CurrentWindowCmd.cc
parent7e4f8a38531642cc9cb6cba31499d549f4c5f8a0 (diff)
downloadfluxbox-72130f350ef08c6200d18e544b861940cbcb7526.zip
fluxbox-72130f350ef08c6200d18e544b861940cbcb7526.tar.bz2
add OnWindow modifier to keys file
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 58ec78c..01b8de7 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -26,6 +26,7 @@
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28#include "Window.hh" 28#include "Window.hh"
29#include "WindowCmd.hh"
29#include "Screen.hh" 30#include "Screen.hh"
30#include "WinClient.hh" 31#include "WinClient.hh"
31 32
@@ -33,7 +34,7 @@
33 34
34void WindowHelperCmd::execute() { 35void WindowHelperCmd::execute() {
35 m_win = 0; 36 m_win = 0;
36 if (FocusControl::focusedFbWindow()) // guarantee that fbwindow() exists too 37 if (WindowCmd<void>::window() || FocusControl::focusedFbWindow())
37 real_execute(); 38 real_execute();
38} 39}
39 40
@@ -44,7 +45,11 @@ void WindowHelperCmd::execute(FluxboxWindow &win) {
44 45
45FluxboxWindow &WindowHelperCmd::fbwindow() { 46FluxboxWindow &WindowHelperCmd::fbwindow() {
46 // will exist from execute above 47 // will exist from execute above
47 return (m_win ? *m_win : *FocusControl::focusedFbWindow()); 48 if (m_win)
49 return *m_win;
50 FluxboxWindow *tmp = WindowCmd<void>::window();
51 if (tmp) return *tmp;
52 return *FocusControl::focusedFbWindow();
48} 53}
49 54
50void CurrentWindowCmd::real_execute() { 55void CurrentWindowCmd::real_execute() {