diff --git a/src/Window.cc b/src/Window.cc index 0b161f6c..c58e0b3d 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2706,6 +2706,8 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) { break; case XA_WM_TRANSIENT_FOR: { + bool s = flags.stuck; + // determine if this is a transient window getTransientInfo(); @@ -2714,6 +2716,7 @@ void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) { functions &= ~Func_Maximize; setAllowedActions(); setupDecor(); + if (flags.stuck != s) stick(); } reconfigure(); diff --git a/src/Workspace.cc b/src/Workspace.cc index b03ee7b2..11d5187d 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -101,9 +101,7 @@ void Workspace::addWindow(BlackboxWindow *w, bool place, bool sticky) { if (screen->doFocusNew() || (w->isTransient() && w->getTransientFor() && w->getTransientFor()->isFocused())) { - if (id == screen->getCurrentWorkspaceID()) - w->setInputFocus(); - else { + if (id != screen->getCurrentWorkspaceID()) { /* not on the focused workspace, so the window is not going to get focus but if the user wants new windows focused, then it should get focus