diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommands.cc | 10 | ||||
-rw-r--r-- | src/WorkspaceCmd.cc | 13 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc index c8cf4ae..10d98e7 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc | |||
@@ -303,8 +303,9 @@ void ShowClientMenuCmd::execute() { | |||
303 | FocusControl::Focusables::const_iterator it = list->clientList().begin(), | 303 | FocusControl::Focusables::const_iterator it = list->clientList().begin(), |
304 | it_end = list->clientList().end(); | 304 | it_end = list->clientList().end(); |
305 | for (; it != it_end; ++it) { | 305 | for (; it != it_end; ++it) { |
306 | if (typeid(**it) == typeid(FluxboxWindow) && m_pat.match(**it)) | 306 | Focusable* f = *it; |
307 | m_list.push_back(static_cast<FluxboxWindow *>(*it)); | 307 | if (typeid(*f) == typeid(FluxboxWindow) && m_pat.match(*f)) |
308 | m_list.push_back(static_cast<FluxboxWindow *>(f)); | ||
308 | } | 309 | } |
309 | 310 | ||
310 | m_menu.reset(new ClientMenu(*screen, m_list, | 311 | m_menu.reset(new ClientMenu(*screen, m_list, |
@@ -572,8 +573,9 @@ void ClientPatternTestCmd::execute() { | |||
572 | wit_end = windows->clientList().end(); | 573 | wit_end = windows->clientList().end(); |
573 | 574 | ||
574 | for ( ; wit != wit_end; wit++) { | 575 | for ( ; wit != wit_end; wit++) { |
575 | if (typeid(**wit) == typeid(FluxboxWindow) && cp->match(**wit)) { | 576 | Focusable* f = *wit; |
576 | matches.push_back(static_cast<const FluxboxWindow*>(*wit)); | 577 | if (typeid(*f) == typeid(FluxboxWindow) && cp->match(*f)) { |
578 | matches.push_back(static_cast<const FluxboxWindow*>(f)); | ||
577 | } | 579 | } |
578 | } | 580 | } |
579 | } | 581 | } |
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 | } |