aboutsummaryrefslogtreecommitdiff
path: root/src/Window.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/Window.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/Window.cc')
-rw-r--r--src/Window.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Window.cc b/src/Window.cc
index ff005c3..a3a10c5 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1053,7 +1053,8 @@ bool FluxboxWindow::setCurrentClient(WinClient &client, bool setinput) {
1053 if (client.fbwindow() != this) 1053 if (client.fbwindow() != this)
1054 return false; 1054 return false;
1055 1055
1056 m_screen.focusControl().setScreenFocusedWindow(client); 1056 if (&client != m_client)
1057 m_screen.focusControl().setScreenFocusedWindow(client);
1057 m_client = &client; 1058 m_client = &client;
1058 m_client->raise(); 1059 m_client->raise();
1059 m_client->focusSig().notify(); 1060 m_client->focusSig().notify();
@@ -1432,6 +1433,11 @@ bool FluxboxWindow::setInputFocus() {
1432 1433
1433 if (! m_client->validateClient()) 1434 if (! m_client->validateClient())
1434 return false; 1435 return false;
1436
1437 // this needs to be here rather than setFocusFlag because
1438 // FocusControl::revertFocus will return before FocusIn events arrive
1439 m_screen.focusControl().setScreenFocusedWindow(*m_client);
1440
1435#ifdef DEBUG 1441#ifdef DEBUG
1436 cerr<<"FluxboxWindow::"<<__FUNCTION__<<" isModal() = "<<m_client->isModal()<<endl; 1442 cerr<<"FluxboxWindow::"<<__FUNCTION__<<" isModal() = "<<m_client->isModal()<<endl;
1437 cerr<<"FluxboxWindow::"<<__FUNCTION__<<" transient size = "<<m_client->transients.size()<<endl; 1443 cerr<<"FluxboxWindow::"<<__FUNCTION__<<" transient size = "<<m_client->transients.size()<<endl;
@@ -2124,10 +2130,6 @@ void FluxboxWindow::setFocusFlag(bool focus) {
2124#ifdef DEBUG 2130#ifdef DEBUG
2125 cerr<<"FluxboxWindow("<<title()<<")::setFocusFlag("<<focus<<")"<<endl; 2131 cerr<<"FluxboxWindow("<<title()<<")::setFocusFlag("<<focus<<")"<<endl;
2126#endif // DEBUG 2132#endif // DEBUG
2127 // Record focus timestamp for window cycling enhancements
2128 if (focused) {
2129 screen().focusControl().setScreenFocusedWindow(*m_client);
2130 }
2131 2133
2132 installColormap(focus); 2134 installColormap(focus);
2133 2135