use winclient instead of fluxboxwindow for matching, and removing old code
This commit is contained in:
parent
675bc5d66a
commit
0a7cb3db1f
4 changed files with 9 additions and 9 deletions
|
@ -57,6 +57,13 @@ FluxboxWindow &WindowHelperBoolCmd::fbwindow() {
|
|||
return *FocusControl::focusedFbWindow();
|
||||
}
|
||||
|
||||
WinClient &WindowHelperBoolCmd::winclient() {
|
||||
// will exist from execute above
|
||||
WinClient *tmp = WindowCmd<void>::client();
|
||||
if (tmp) return *tmp;
|
||||
return *FocusControl::focusedWindow();
|
||||
}
|
||||
|
||||
void CurrentWindowCmd::real_execute() {
|
||||
(fbwindow().*m_action)();
|
||||
}
|
||||
|
@ -234,5 +241,5 @@ void SetAlphaCmd::real_execute() {
|
|||
}
|
||||
|
||||
bool MatchCmd::real_execute() {
|
||||
return m_pat.match(fbwindow());
|
||||
return m_pat.match(winclient());
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public:
|
|||
|
||||
protected:
|
||||
FluxboxWindow &fbwindow();
|
||||
WinClient &winclient();
|
||||
virtual bool real_execute() = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -64,9 +64,6 @@ void WindowListCmd::execute() {
|
|||
}
|
||||
|
||||
bool SomeCmd::bool_execute() {
|
||||
if (m_pat.error())
|
||||
return m_cmd->bool_execute();
|
||||
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
if (screen != 0) {
|
||||
FocusControl::Focusables win_list(screen->focusControl().creationOrderList().clientList());
|
||||
|
@ -85,9 +82,6 @@ bool SomeCmd::bool_execute() {
|
|||
}
|
||||
|
||||
bool EveryCmd::bool_execute() {
|
||||
if (m_pat.error())
|
||||
return m_cmd->bool_execute();
|
||||
|
||||
BScreen *screen = Fluxbox::instance()->keyScreen();
|
||||
if (screen != 0) {
|
||||
FocusControl::Focusables win_list(screen->focusControl().creationOrderList().clientList());
|
||||
|
|
|
@ -52,7 +52,6 @@ public:
|
|||
|
||||
private:
|
||||
FbTk::RefCount<FbTk::BoolCommand> m_cmd;
|
||||
ClientPattern m_pat;
|
||||
};
|
||||
|
||||
class EveryCmd: public FbTk::BoolCommand {
|
||||
|
@ -63,7 +62,6 @@ public:
|
|||
|
||||
private:
|
||||
FbTk::RefCount<FbTk::BoolCommand> m_cmd;
|
||||
ClientPattern m_pat;
|
||||
};
|
||||
|
||||
class AttachCmd: public FbTk::Command {
|
||||
|
|
Loading…
Reference in a new issue