aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FocusControl.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 47a0a71..6ccc9a1 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -488,13 +488,16 @@ void FocusControl::revertFocus(BScreen &screen) {
488 if (s_reverting || screen.isShuttingdown()) 488 if (s_reverting || screen.isShuttingdown())
489 return; 489 return;
490 490
491 FocusControl::s_reverting = true;
492
493 Focusable *next_focus = 491 Focusable *next_focus =
494 screen.focusControl().lastFocusedWindow(screen.currentWorkspaceID()); 492 screen.focusControl().lastFocusedWindow(screen.currentWorkspaceID());
495 493
494 if (next_focus && next_focus->fbwindow() &&
495 next_focus->fbwindow()->isStuck())
496 FocusControl::s_reverting = true;
497
496 // if setting focus fails, or isn't possible, fallback correctly 498 // if setting focus fails, or isn't possible, fallback correctly
497 if (!(next_focus && next_focus->focus())) { 499 if (!(next_focus && next_focus->focus())) {
500
498 setFocusedWindow(0); // so we don't get dangling m_focused_window pointer 501 setFocusedWindow(0); // so we don't get dangling m_focused_window pointer
499 // if there's a menu open, focus it 502 // if there's a menu open, focus it
500 if (FbTk::Menu::shownMenu()) 503 if (FbTk::Menu::shownMenu())