aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-01 18:29:36 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-01 18:29:36 (GMT)
commit7588fc10a61c141208ccccc423cc7920207b2e89 (patch)
treeca9acf5c5bb36df5a9a77a4b7ce0f79cb3e054ab /src/FocusControl.cc
parent72d2f0e48143115aae38b75d5b1bda4cee5d512a (diff)
downloadfluxbox-7588fc10a61c141208ccccc423cc7920207b2e89.zip
fluxbox-7588fc10a61c141208ccccc423cc7920207b2e89.tar.bz2
fix some flickering on focus change
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()) {