bool BlackboxWindow::setInputFocus(void) {
if (flags.focused) return True;
- assert((flags.stuck || // window must be on the current workspace or sticky
- blackbox_attrib.workspace == screen->getCurrentWorkspaceID()));
+ assert(flags.stuck || // window must be on the current workspace or sticky
+ blackbox_attrib.workspace == screen->getCurrentWorkspaceID());
/*
We only do this check for normal windows and dialogs because other windows
focus = True;
}
- if (focus && (win->isTransient() || win->getScreen()->doFocusNew()))
+ if (focus && (win->isTransient() || win->getScreen()->doFocusNew()) &&
+ win->isVisible())
win->setInputFocus();
} else {
BScreen *screen = searchScreen(e->xmaprequest.parent);