aboutsummaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-11-22 04:07:57 (GMT)
committermarkt <markt>2007-11-22 04:07:57 (GMT)
commit675bc5d66aa08311e99cb00cf836d16a910a73df (patch)
tree9118f77bcc38631f944cdf4a07d2173011a29a9b /src/CurrentWindowCmd.cc
parent08ebff4b319f51b4263cded0bb9c04103bcd9c3a (diff)
downloadfluxbox-675bc5d66aa08311e99cb00cf836d16a910a73df.zip
fluxbox-675bc5d66aa08311e99cb00cf836d16a910a73df.tar.bz2
added conditional statements to keys file
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 929be5d..a5265f9 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -33,20 +33,25 @@
33#include "FocusControl.hh" 33#include "FocusControl.hh"
34 34
35void WindowHelperCmd::execute() { 35void WindowHelperCmd::execute() {
36 m_win = 0;
37 if (WindowCmd<void>::window() || FocusControl::focusedFbWindow()) 36 if (WindowCmd<void>::window() || FocusControl::focusedFbWindow())
38 real_execute(); 37 real_execute();
39} 38}
40 39
41void WindowHelperCmd::execute(FluxboxWindow &win) { 40FluxboxWindow &WindowHelperCmd::fbwindow() {
42 m_win = &win; 41 // will exist from execute above
43 real_execute(); 42 FluxboxWindow *tmp = WindowCmd<void>::window();
43 if (tmp) return *tmp;
44 return *FocusControl::focusedFbWindow();
44} 45}
45 46
46FluxboxWindow &WindowHelperCmd::fbwindow() { 47bool WindowHelperBoolCmd::bool_execute() {
48 if (WindowCmd<void>::window() || FocusControl::focusedFbWindow())
49 return real_execute();
50 return false;
51}
52
53FluxboxWindow &WindowHelperBoolCmd::fbwindow() {
47 // will exist from execute above 54 // will exist from execute above
48 if (m_win)
49 return *m_win;
50 FluxboxWindow *tmp = WindowCmd<void>::window(); 55 FluxboxWindow *tmp = WindowCmd<void>::window();
51 if (tmp) return *tmp; 56 if (tmp) return *tmp;
52 return *FocusControl::focusedFbWindow(); 57 return *FocusControl::focusedFbWindow();
@@ -227,3 +232,7 @@ void SetAlphaCmd::real_execute() {
227 } else 232 } else
228 fbwindow().setUnfocusedAlpha(m_unfocus); 233 fbwindow().setUnfocusedAlpha(m_unfocus);
229} 234}
235
236bool MatchCmd::real_execute() {
237 return m_pat.match(fbwindow());
238}