workspace: Don't activate desktop window when it gets added
Unless there is no focus window. Matches X11 behavior. Otherwise (re)starting plasmashell would pull focus away from whatever window is currently focussed.
This commit is contained in:
parent
ef41fa8e8f
commit
ba8c52564e
1 changed files with 5 additions and 1 deletions
|
@ -827,7 +827,11 @@ void Workspace::addWaylandWindow(Window *window)
|
|||
if (window->wantsInput() && !window->isMinimized()) {
|
||||
// Never activate a window on its own in "Extreme" mode.
|
||||
if (options->focusStealingPreventionLevel() < 4) {
|
||||
activateWindow(window);
|
||||
if (!window->isDesktop()
|
||||
// If there's no active window, make this desktop the active one.
|
||||
|| (activeWindow() == nullptr && should_get_focus.count() == 0)) {
|
||||
activateWindow(window);
|
||||
}
|
||||
}
|
||||
}
|
||||
updateTabbox();
|
||||
|
|
Loading…
Reference in a new issue