aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2006-07-09 04:45:02 (GMT)
committermarkt <markt>2006-07-09 04:45:02 (GMT)
commit8a640f8d638d1f330f816a2ed00931ba2d01847d (patch)
tree92e75171c47716a3a2b642c5298054ce8bc13a2b /src
parentf7574fe1c90118ca7421dffef0b035cb64cf78c1 (diff)
downloadfluxbox_paul-8a640f8d638d1f330f816a2ed00931ba2d01847d.zip
fluxbox_paul-8a640f8d638d1f330f816a2ed00931ba2d01847d.tar.bz2
setting focus the right way
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc4
-rw-r--r--src/Window.cc17
2 files changed, 8 insertions, 13 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index d0accfc..c0d0706 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1375,8 +1375,6 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1375 // always put on end of focused list, if it gets focused it'll get pushed up 1375 // always put on end of focused list, if it gets focused it'll get pushed up
1376 // there is only the one win client at this stage 1376 // there is only the one win client at this stage
1377 focusControl().addFocusBack(*winclient); 1377 focusControl().addFocusBack(*winclient);
1378 if (focusControl().focusNew())
1379 FocusControl::setFocusedWindow(winclient);
1380 1378
1381 // we also need to check if another window expects this window to the left 1379 // we also need to check if another window expects this window to the left
1382 // and if so, then join it. 1380 // and if so, then join it.
@@ -1416,7 +1414,7 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
1416 } 1414 }
1417 1415
1418 if (focusControl().focusNew() || FocusControl::focusedWindow() == &client) 1416 if (focusControl().focusNew() || FocusControl::focusedWindow() == &client)
1419 FocusControl::setFocusedWindow(&client); 1417 win->setInputFocus();
1420 1418
1421 m_clientlist_sig.notify(); 1419 m_clientlist_sig.notify();
1422 1420
diff --git a/src/Window.cc b/src/Window.cc
index 85d1ac6..d9c273a 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -2470,17 +2470,14 @@ void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) {
2470 2470
2471 setState(NormalState, false); 2471 setState(NormalState, false);
2472 2472
2473 if (client->isTransient()) 2473 FluxboxWindow *cur = FocusControl::focusedFbWindow();
2474 if (client->isTransient() ||
2475 m_screen.currentWorkspace()->numberOfWindows() == 1 ||
2476 m_screen.focusControl().focusNew() && !(cur && cur->isFullscreen()))
2474 setCurrentClient(*client, true); 2477 setCurrentClient(*client, true);
2475 else if (screen().focusControl().focusNew()) { 2478 else if (m_screen.focusControl().focusNew())
2476 FluxboxWindow *cur = FocusControl::focusedFbWindow(); 2479 Fluxbox::instance()->attentionHandler().addAttention(*client);
2477 if (cur && cur->isFullscreen()) { 2480
2478 setFocusFlag(false);
2479 Fluxbox::instance()->attentionHandler().addAttention(*client);
2480 } else
2481 setCurrentClient(*client, true);
2482 } else
2483 setFocusFlag(false);
2484 2481
2485 iconic = false; 2482 iconic = false;
2486 2483