Bug 401105 - Open new window in other virtual desktop won't switch to that desktop
Summary: Open new window in other virtual desktop won't switch to that desktop
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-16 12:23 UTC by Guo Yunhe
Modified: 2018-11-16 12:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2018-11-16 12:23:59 UTC
SUMMARY

When window A is focused in current desktop and new window B is created in other  desktop, desktop doesn't automatically switch to where the new window has been opened.

STEPS TO REPRODUCE

You have at least two virtual desktop. One is Desktop A, the other is Desktop B.

You have any two different applications, for example: Dolphin, Juk.

1. Open Dolphin and Juk in Desktop A.
2. Set KWin rules so that Juk is forced to show in Desktop B. Juk will be switched to Desktop B immediately.
3. Switch to Desktop B.
4. Minimize Juk in system tray (click close button) or simply quit it.
5. Switch to Desktop A.
6. Click on the title bar of Dolphin so it is focused. (Skip this step will cause totally different result)
7. Click Juk system tray icon or from application launcher (Kick-off).

Can be reproduced with any applications.

OBSERVED RESULT

You are still in Desktop A but Juk is opened in Desktop B. You have to manually switch to Desktop B.

EXPECTED RESULT

Juk is opened in Desktop B and you will automatically switch to B, too. So you can see the new opened Juk window immediately.

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: openSUSE Tumbleweed 20181112
(available in About System)
KDE Plasma Version: 5.14.3
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.2

ADDITIONAL INFORMATION
Comment 1 Martin Flöser 2018-11-16 12:32:29 UTC
The described behavior is not a bug but expected behavior. Juk is stealing focus by just opening a window (minimize to systray is like opening a new window). KWin correctly refuses to switch the desktop for a focus stealing window. The bug is with Juk for not providing enough context hints for KWin to notice that it's not stealing focus.
Comment 2 Guo Yunhe 2018-11-16 12:36:42 UTC
(In reply to Martin Flöser from comment #1)
> The described behavior is not a bug but expected behavior. Juk is stealing
> focus by just opening a window (minimize to systray is like opening a new
> window). KWin correctly refuses to switch the desktop for a focus stealing
> window. The bug is with Juk for not providing enough context hints for KWin
> to notice that it's not stealing focus.

It is not only for system tray applications. For example, you open any new applications which is opened in another desktop, it won't be switched to the desktop. Is this also an expected behavior?