re-fixing the focus after fixing the crash bug
This commit is contained in:
parent
b407e121ba
commit
84ca1f2e2f
4 changed files with 14 additions and 23 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0rc3:
|
||||
*06/07/06:
|
||||
* Still trying to get the focus right: bug #1517750 (Mark)
|
||||
FocusControl.cc Window.cc Screen.cc
|
||||
*06/07/05:
|
||||
* Fix crash on startup on some platforms (Simon)
|
||||
FbTk/FbString.cc
|
||||
|
|
|
@ -458,18 +458,8 @@ void FocusControl::setFocusedWindow(WinClient *client) {
|
|||
#endif // DEBUG
|
||||
|
||||
// Update the old focused client to non focus
|
||||
// check if s_focused_window is valid
|
||||
if (s_focused_window != 0 &&
|
||||
Fluxbox::instance()->validateClient(s_focused_window)) {
|
||||
|
||||
if (!client && s_focused_fbwindow)
|
||||
s_focused_fbwindow->setFocusFlag(false);
|
||||
|
||||
} else {
|
||||
s_focused_window = 0;
|
||||
s_focused_fbwindow = 0;
|
||||
}
|
||||
|
||||
if (s_focused_fbwindow)
|
||||
s_focused_fbwindow->setFocusFlag(false);
|
||||
|
||||
if (client && client->fbwindow() && !client->fbwindow()->isIconic()) {
|
||||
// screen should be ok
|
||||
|
|
|
@ -1365,11 +1365,10 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
|||
|
||||
// always put on end of focused list, if it gets focused it'll get pushed up
|
||||
// there is only the one win client at this stage
|
||||
focusControl().addFocusBack(*winclient);
|
||||
if (focusControl().focusNew())
|
||||
focusControl().addFocusFront(*winclient);
|
||||
else
|
||||
focusControl().addFocusBack(*winclient);
|
||||
|
||||
FocusControl::setFocusedWindow(winclient);
|
||||
|
||||
// we also need to check if another window expects this window to the left
|
||||
// and if so, then join it.
|
||||
FluxboxWindow *otherwin = 0;
|
||||
|
@ -1407,6 +1406,9 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (focusControl().focusNew() || FocusControl::focusedWindow() == &client)
|
||||
FocusControl::setFocusedWindow(&client);
|
||||
|
||||
m_clientlist_sig.notify();
|
||||
|
||||
return win;
|
||||
|
|
|
@ -703,11 +703,9 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
|
|||
m_workspacesig.notify();
|
||||
m_layersig.notify();
|
||||
|
||||
if (was_focused != 0) {
|
||||
if (was_focused != 0)
|
||||
// already has focus, we're just assuming the state of the old window
|
||||
setCurrentClient(*was_focused, false);
|
||||
frame().setFocus(true);
|
||||
}
|
||||
FocusControl::setFocusedWindow(&client);
|
||||
|
||||
frame().reconfigure();
|
||||
|
||||
|
@ -776,10 +774,8 @@ void FluxboxWindow::detachCurrentClient() {
|
|||
return;
|
||||
WinClient &client = *m_client;
|
||||
detachClient(*m_client);
|
||||
if (client.fbwindow() != 0) {
|
||||
if (client.fbwindow() != 0)
|
||||
client.fbwindow()->show();
|
||||
FocusControl::setFocusedWindow(&client);
|
||||
}
|
||||
}
|
||||
|
||||
/// removes client from client list, does not create new fluxboxwindow for it
|
||||
|
|
Loading…
Reference in a new issue