Bug 440894 - QtCreator pop-ups steal focus and are moved to top of window stack under wayland
Summary: QtCreator pop-ups steal focus and are moved to top of window stack under wayland
Status: RESOLVED LATER
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 5.22.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 11:41 UTC by Knut Andre Tidemann
Modified: 2021-08-12 12:11 UTC (History)
1 user (show)

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 Knut Andre Tidemann 2021-08-12 11:41:05 UTC
SUMMARY
When changing a file opened in Qt Creator from another application, such as the terminal, a pop-up window will appear and steal the focus, asking to reload the contents of the file.

This steals both keyboard focus and is put in front of all other windows. This really messes up with any ongoing typing.

This might happen with other applications that have this behavior as well, but I've only really noticed it with Qt Creator.

The behavior changed from plasma 5.21 to 5.22 as the popup was kept in the background in 5.21.


Even setting focus stealing prevention for the Qt Creator application to 'Extreme' does not seem to resolve the issue.

STEPS TO REPRODUCE
1. Open a file in Qt Creator
2. Change this file from the terminal

OBSERVED RESULT
Qt Creator and its pop-up notification steal focus and move to the front of the stack.


EXPECTED RESULT
The popup is opened in the background and does not steal keyboard focus.


SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Comment 1 David Edmundson 2021-08-12 11:52:39 UTC
Yeah :(

This is something that will be addressed when we can rely on clients supporting explicit window activation, till then there isn't much we can do.

Pragmatically for QtCreator this means Qt6.

As a rubbish workaround you can run qtcreator --platform xcb
Comment 2 Knut Andre Tidemann 2021-08-12 12:11:10 UTC
Well, thanks for the workaround at least!