diff options
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r-- | src/FocusControl.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 11ee0a7..126f8b1 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -274,7 +274,7 @@ void FocusControl::stopCyclingFocus() { | |||
274 | * is given. | 274 | * is given. |
275 | */ | 275 | */ |
276 | Focusable *FocusControl::lastFocusedWindow(int workspace) { | 276 | Focusable *FocusControl::lastFocusedWindow(int workspace) { |
277 | if (m_focused_list.empty()) return 0; | 277 | if (m_focused_list.empty() || m_screen.isShuttingdown()) return 0; |
278 | if (workspace < 0 || workspace >= (int) m_screen.numberOfWorkspaces()) | 278 | if (workspace < 0 || workspace >= (int) m_screen.numberOfWorkspaces()) |
279 | return m_focused_list.front(); | 279 | return m_focused_list.front(); |
280 | 280 | ||
@@ -472,8 +472,6 @@ void FocusControl::shutdown() { | |||
472 | Focusables::reverse_iterator it = m_focused_list.rbegin(); | 472 | Focusables::reverse_iterator it = m_focused_list.rbegin(); |
473 | for (; it != m_focused_list.rend(); ++it) { | 473 | for (; it != m_focused_list.rend(); ++it) { |
474 | WinClient *client = dynamic_cast<WinClient *>(*it); | 474 | WinClient *client = dynamic_cast<WinClient *>(*it); |
475 | if (client) | ||
476 | std::cerr << "FocusControl::shutdown: " << client->title() << std::endl; | ||
477 | if (client && client->fbwindow()) | 475 | if (client && client->fbwindow()) |
478 | client->fbwindow()->restore(client, true); | 476 | client->fbwindow()->restore(client, true); |
479 | } | 477 | } |
@@ -484,7 +482,7 @@ std::cerr << "FocusControl::shutdown: " << client->title() << std::endl; | |||
484 | * focus is meant to be, it'll make things right ;-) | 482 | * focus is meant to be, it'll make things right ;-) |
485 | */ | 483 | */ |
486 | void FocusControl::revertFocus(BScreen &screen) { | 484 | void FocusControl::revertFocus(BScreen &screen) { |
487 | if (s_reverting) | 485 | if (s_reverting || screen.isShuttingdown()) |
488 | return; | 486 | return; |
489 | 487 | ||
490 | FocusControl::s_reverting = true; | 488 | FocusControl::s_reverting = true; |