aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 426c026..184b69b 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -251,10 +251,9 @@ Focusable *FocusControl::lastFocusedWindow(int workspace) {
251 Focusables::iterator it = m_focused_list.clientList().begin(); 251 Focusables::iterator it = m_focused_list.clientList().begin();
252 Focusables::iterator it_end = m_focused_list.clientList().end(); 252 Focusables::iterator it_end = m_focused_list.clientList().end();
253 for (; it != it_end; ++it) { 253 for (; it != it_end; ++it) {
254 if ((*it)->fbwindow() && 254 if ((*it)->fbwindow() && (*it)->acceptsFocus() &&
255 ((((int)(*it)->fbwindow()->workspaceNumber()) == workspace || 255 ((((int)(*it)->fbwindow()->workspaceNumber()) == workspace ||
256 (*it)->fbwindow()->isStuck()) && (*it)->acceptsFocus() && 256 (*it)->fbwindow()->isStuck()) && !(*it)->fbwindow()->isIconic()))
257 !(*it)->fbwindow()->isIconic()))
258 return *it; 257 return *it;
259 } 258 }
260 return 0; 259 return 0;
@@ -531,7 +530,8 @@ void FocusControl::setFocusedWindow(WinClient *client) {
531#endif // DEBUG 530#endif // DEBUG
532 531
533 // Update the old focused client to non focus 532 // Update the old focused client to non focus
534 if (s_focused_fbwindow) 533 if (s_focused_fbwindow &&
534 (!client || client->fbwindow() != s_focused_fbwindow))
535 s_focused_fbwindow->setFocusFlag(false); 535 s_focused_fbwindow->setFocusFlag(false);
536 536
537 if (client && client->fbwindow() && !client->fbwindow()->isIconic()) { 537 if (client && client->fbwindow() && !client->fbwindow()->isIconic()) {