aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 7b2fecd..d4cb410 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -421,11 +421,13 @@ void FocusControl::revertFocus(BScreen &screen) {
421 if (s_reverting) 421 if (s_reverting)
422 return; 422 return;
423 423
424 FocusControl::s_reverting = true;
425
426 WinClient *next_focus = 424 WinClient *next_focus =
427 screen.focusControl().lastFocusedWindow(screen.currentWorkspaceID()); 425 screen.focusControl().lastFocusedWindow(screen.currentWorkspaceID());
428 426
427 if (next_focus && next_focus->fbwindow() &&
428 next_focus->fbwindow()->isStuck())
429 FocusControl::s_reverting = true;
430
429 // if setting focus fails, or isn't possible, fallback correctly 431 // if setting focus fails, or isn't possible, fallback correctly
430 if (!(next_focus && next_focus->focus())) { 432 if (!(next_focus && next_focus->focus())) {
431 setFocusedWindow(0); // so we don't get dangling m_focused_window pointer 433 setFocusedWindow(0); // so we don't get dangling m_focused_window pointer