aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-01-13 19:24:35 (GMT)
committermarkt <markt>2007-01-13 19:24:35 (GMT)
commit16743aad06e7f8b6c2d3b0aab4311980ce06dc16 (patch)
tree76c039d232794177028d08b0409e4fd8625c328e /src/FocusControl.cc
parentfa2519525aa8e08c4c11393a8734c606a7820ee1 (diff)
downloadfluxbox-16743aad06e7f8b6c2d3b0aab4311980ce06dc16.zip
fluxbox-16743aad06e7f8b6c2d3b0aab4311980ce06dc16.tar.bz2
don't change focus order unless the user specifically focuses a window
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index c5441dd..9c82e3e 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -39,6 +39,7 @@ using std::string;
39 39
40WinClient *FocusControl::s_focused_window = 0; 40WinClient *FocusControl::s_focused_window = 0;
41FluxboxWindow *FocusControl::s_focused_fbwindow = 0; 41FluxboxWindow *FocusControl::s_focused_fbwindow = 0;
42bool FocusControl::s_reverting = false;
42 43
43FocusControl::FocusControl(BScreen &screen): 44FocusControl::FocusControl(BScreen &screen):
44 m_screen(screen), 45 m_screen(screen),
@@ -242,7 +243,7 @@ void FocusControl::setScreenFocusedWindow(WinClient &win_client) {
242 243
243 // raise newly focused window to the top of the focused list 244 // raise newly focused window to the top of the focused list
244 // don't change the order if we're cycling or shutting down 245 // don't change the order if we're cycling or shutting down
245 if (!m_cycling_focus && !win_client.screen().isShuttingdown()) { 246 if (!isCycling() && !m_screen.isShuttingdown() && !s_reverting) {
246 m_focused_list.remove(&win_client); 247 m_focused_list.remove(&win_client);
247 m_focused_list.push_front(&win_client); 248 m_focused_list.push_front(&win_client);
248 m_cycling_window = m_focused_list.begin(); 249 m_cycling_window = m_focused_list.begin();
@@ -396,6 +397,8 @@ void FocusControl::revertFocus(BScreen &screen) {
396 if (screen.focusControl().isCycling()) 397 if (screen.focusControl().isCycling())
397 return; 398 return;
398 399
400 FocusControl::s_reverting = true;
401
399 WinClient *next_focus = 402 WinClient *next_focus =
400 screen.focusControl().lastFocusedWindow(screen.currentWorkspaceID()); 403 screen.focusControl().lastFocusedWindow(screen.currentWorkspaceID());
401 404
@@ -412,6 +415,8 @@ void FocusControl::revertFocus(BScreen &screen) {
412 break; 415 break;
413 } 416 }
414 } 417 }
418
419 FocusControl::s_reverting = false;
415} 420}
416 421
417/* 422/*