aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 7c0bed9..90d0a4a 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1404,7 +1404,8 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1404 } 1404 }
1405 1405
1406 // add the window to the focus list 1406 // add the window to the focus list
1407 if (focusControl().focusNew()) 1407 // always add to front on startup to keep the focus order the same
1408 if (focusControl().focusNew() || Fluxbox::instance()->isStartup())
1408 focusControl().addFocusFront(*winclient); 1409 focusControl().addFocusFront(*winclient);
1409 else 1410 else
1410 focusControl().addFocusBack(*winclient); 1411 focusControl().addFocusBack(*winclient);
@@ -1435,7 +1436,7 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
1435 1436
1436#ifdef SLIT 1437#ifdef SLIT
1437 if (win->initialState() == WithdrawnState && slit() != 0) { 1438 if (win->initialState() == WithdrawnState && slit() != 0) {
1438 slit()->addClient(win->clientWindow()); 1439 slit()->addClient(client.window());
1439 } 1440 }
1440#endif // SLIT 1441#endif // SLIT
1441 1442
@@ -1445,8 +1446,11 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
1445 return 0; 1446 return 0;
1446 } 1447 }
1447 1448
1448 // can't setInputFocus yet and mapNotifyEvent doesn't happen for the client 1449 win->show();
1449 if (focusControl().focusNew() || FocusControl::focusedWindow() == &client) 1450 // don't ask me why, but client doesn't seem to keep focus in new window
1451 // and we don't seem to get a FocusIn event from setInputFocus
1452 if ((focusControl().focusNew() || FocusControl::focusedWindow() == &client)
1453 && win->setInputFocus())
1450 FocusControl::setFocusedWindow(&client); 1454 FocusControl::setFocusedWindow(&client);
1451 1455
1452 m_clientlist_sig.notify(); 1456 m_clientlist_sig.notify();