when nothing is to be focused, give the root window focus instead of the toolbar (since the toolbar is not neccesarily mapped anymore!)

This commit is contained in:
Dana Jansens 2002-05-28 10:15:08 +00:00
parent 57ac5e5b5e
commit b13452a0c0

View file

@ -1161,17 +1161,17 @@ void Blackbox::setFocusedWindow(BlackboxWindow *win) {
if (active_screen) {
// set input focus to the toolbar of the screen with mouse
XSetInputFocus(getXDisplay(),
active_screen->getToolbar()->getWindowID(),
active_screen->getRootWindow(),
RevertToPointerRoot, CurrentTime);
} else {
// set input focus to the toolbar of the first managed screen
XSetInputFocus(getXDisplay(),
screenList.front()->getToolbar()->getWindowID(),
screenList.front()->getRootWindow(),
RevertToPointerRoot, CurrentTime);
}
} else {
// set input focus to the toolbar of the last screen
XSetInputFocus(getXDisplay(), old_screen->getToolbar()->getWindowID(),
XSetInputFocus(getXDisplay(), old_screen->getRootWindow(),
RevertToPointerRoot, CurrentTime);
}
}