aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
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() {