aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-08-20 14:32:03 (GMT)
committermarkt <markt>2007-08-20 14:32:03 (GMT)
commit667d4d301441cb3ef7fdb189d383da084fb80b23 (patch)
tree609097a925add22687fc5cc67811a5545a88b967 /src
parent1b70e86e56b14b4200ddc35812aa16d827b9fe21 (diff)
downloadfluxbox-667d4d301441cb3ef7fdb189d383da084fb80b23.zip
fluxbox-667d4d301441cb3ef7fdb189d383da084fb80b23.tar.bz2
fix problems with focus order when changing workspaces
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())