aboutsummaryrefslogtreecommitdiff
path: root/src/WorkspaceCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorkspaceCmd.cc')
-rw-r--r--src/WorkspaceCmd.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/WorkspaceCmd.cc b/src/WorkspaceCmd.cc
index 2af6b2f..4598568 100644
--- a/src/WorkspaceCmd.cc
+++ b/src/WorkspaceCmd.cc
@@ -86,12 +86,15 @@ void WindowListCmd::execute() {
86 // save old value, so we can restore it later 86 // save old value, so we can restore it later
87 WinClient *old = WindowCmd<void>::client(); 87 WinClient *old = WindowCmd<void>::client();
88 for (; it != it_end; ++it) { 88 for (; it != it_end; ++it) {
89 if (typeid(**it) == typeid(FluxboxWindow)) 89 Focusable* wptr = *it;
90 WindowCmd<void>::setWindow((*it)->fbwindow()); 90 if (typeid(*wptr) == typeid(FluxboxWindow)) {
91 else if (typeid(**it) == typeid(WinClient)) 91 WindowCmd<void>::setWindow((wptr)->fbwindow());
92 WindowCmd<void>::setClient(dynamic_cast<WinClient *>(*it)); 92 } else if (typeid(*wptr) == typeid(WinClient)) {
93 if (!m_filter || m_filter->execute()) 93 WindowCmd<void>::setClient(dynamic_cast<WinClient *>(wptr));
94 }
95 if (!m_filter || m_filter->execute()) {
94 m_cmd->execute(); 96 m_cmd->execute();
97 }
95 } 98 }
96 WindowCmd<void>::setClient(old); 99 WindowCmd<void>::setClient(old);
97 } 100 }