diff options
-rw-r--r-- | src/CurrentWindowCmd.cc | 9 | ||||
-rw-r--r-- | src/CurrentWindowCmd.hh | 1 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 6 | ||||
-rw-r--r-- | src/WorkspaceCmd.hh | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index a5265f9..78f3aa1 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -57,6 +57,13 @@ FluxboxWindow &WindowHelperBoolCmd::fbwindow() { | |||
57 | return *FocusControl::focusedFbWindow(); | 57 | return *FocusControl::focusedFbWindow(); |
58 | } | 58 | } |
59 | 59 | ||
60 | WinClient &WindowHelperBoolCmd::winclient() { | ||
61 | // will exist from execute above | ||
62 | WinClient *tmp = WindowCmd<void>::client(); | ||
63 | if (tmp) return *tmp; | ||
64 | return *FocusControl::focusedWindow(); | ||
65 | } | ||
66 | |||
60 | void CurrentWindowCmd::real_execute() { | 67 | void CurrentWindowCmd::real_execute() { |
61 | (fbwindow().*m_action)(); | 68 | (fbwindow().*m_action)(); |
62 | } | 69 | } |
@@ -234,5 +241,5 @@ void SetAlphaCmd::real_execute() { | |||
234 | } | 241 | } |
235 | 242 | ||
236 | bool MatchCmd::real_execute() { | 243 | bool MatchCmd::real_execute() { |
237 | return m_pat.match(fbwindow()); | 244 | return m_pat.match(winclient()); |
238 | } | 245 | } |
diff --git a/src/CurrentWindowCmd.hh b/src/CurrentWindowCmd.hh index e7370de..c8e6242 100644 --- a/src/CurrentWindowCmd.hh +++ b/src/CurrentWindowCmd.hh | |||
@@ -50,6 +50,7 @@ public: | |||
50 | 50 | ||
51 | protected: | 51 | protected: |
52 | FluxboxWindow &fbwindow(); | 52 | FluxboxWindow &fbwindow(); |
53 | WinClient &winclient(); | ||
53 | virtual bool real_execute() = 0; | 54 | virtual bool real_execute() = 0; |
54 | }; | 55 | }; |
55 | 56 | ||
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc index 26f113d..af0f3c5 100644 --- a/src/WorkspaceCmd.cc +++ b/src/WorkspaceCmd.cc | |||
@@ -64,9 +64,6 @@ void WindowListCmd::execute() { | |||
64 | } | 64 | } |
65 | 65 | ||
66 | bool SomeCmd::bool_execute() { | 66 | bool SomeCmd::bool_execute() { |
67 | if (m_pat.error()) | ||
68 | return m_cmd->bool_execute(); | ||
69 | |||
70 | BScreen *screen = Fluxbox::instance()->keyScreen(); | 67 | BScreen *screen = Fluxbox::instance()->keyScreen(); |
71 | if (screen != 0) { | 68 | if (screen != 0) { |
72 | FocusControl::Focusables win_list(screen->focusControl().creationOrderList().clientList()); | 69 | FocusControl::Focusables win_list(screen->focusControl().creationOrderList().clientList()); |
@@ -85,9 +82,6 @@ bool SomeCmd::bool_execute() { | |||
85 | } | 82 | } |
86 | 83 | ||
87 | bool EveryCmd::bool_execute() { | 84 | bool EveryCmd::bool_execute() { |
88 | if (m_pat.error()) | ||
89 | return m_cmd->bool_execute(); | ||
90 | |||
91 | BScreen *screen = Fluxbox::instance()->keyScreen(); | 85 | BScreen *screen = Fluxbox::instance()->keyScreen(); |
92 | if (screen != 0) { | 86 | if (screen != 0) { |
93 | FocusControl::Focusables win_list(screen->focusControl().creationOrderList().clientList()); | 87 | FocusControl::Focusables win_list(screen->focusControl().creationOrderList().clientList()); |
diff --git a/src/WorkspaceCmd.hh b/src/WorkspaceCmd.hh index 4f4545d..eeacc16 100644 --- a/src/WorkspaceCmd.hh +++ b/src/WorkspaceCmd.hh | |||
@@ -52,7 +52,6 @@ public: | |||
52 | 52 | ||
53 | private: | 53 | private: |
54 | FbTk::RefCount<FbTk::BoolCommand> m_cmd; | 54 | FbTk::RefCount<FbTk::BoolCommand> m_cmd; |
55 | ClientPattern m_pat; | ||
56 | }; | 55 | }; |
57 | 56 | ||
58 | class EveryCmd: public FbTk::BoolCommand { | 57 | class EveryCmd: public FbTk::BoolCommand { |
@@ -63,7 +62,6 @@ public: | |||
63 | 62 | ||
64 | private: | 63 | private: |
65 | FbTk::RefCount<FbTk::BoolCommand> m_cmd; | 64 | FbTk::RefCount<FbTk::BoolCommand> m_cmd; |
66 | ClientPattern m_pat; | ||
67 | }; | 65 | }; |
68 | 66 | ||
69 | class AttachCmd: public FbTk::Command { | 67 | class AttachCmd: public FbTk::Command { |