Bug 487557 - Inconsistency in window activation under Wayland in multi-window applications.
Summary: Inconsistency in window activation under Wayland in multi-window applications.
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 6.0.5
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-25 23:50 UTC by Alexey Ivanov
Modified: 2024-06-03 07:09 UTC (History)
2 users (show)

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


Attachments
activation example, cmake/Qt project (2.93 KB, application/x-zip-compressed)
2024-05-25 23:50 UTC, Alexey Ivanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Ivanov 2024-05-25 23:50:51 UTC
Created attachment 169836 [details]
activation example, cmake/Qt project

SUMMARY

KDE 6 Wayland xdg_activation protocol implementation is inconsistent. 

Let's say developer want to create a multi-window application, using 3 QMainWindow.

CASE 1: When you create QMainWindow -> showMinimized() -> activateWindow() never works in first call, only second try starts working. This is a bug!

CASE 2: When you create QMainWindow -> show(), then switching to that new window, resize it, and try to activateWindow() also never works in first try, only second. This is also a bug!

When you create minimized window first and then normal one (or vice versa, doesn't matter) then both activateWindow works.


STEPS TO REPRODUCE CASE 1:
1. Run activation-example from archive attached.
2. Click Show Minimized
3. Click Try Activate Minimized
4. Window won't get activated and still minimized on taskbar.

STEPS TO REPRODUCE CASE 2:
1. Run activation-example from archive attached.
2. Click Show Normal
3. Click on that newly showed window.
4. Move it and resize it.
5. Click on example window with 4 buttons.
6. Also move it and resize it.
7. Click on Try Activate Normal
8. Window won't get activated.


Linux: KDE Neon Testin Edition
KDE Plasma Version:  6.0.5
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0
Comment 1 Alexey Ivanov 2024-05-25 23:53:53 UTC
IIRC, this bug also existed in KDE 6.0 when it landed in Neon User Edition.
Comment 2 Alexey Ivanov 2024-05-26 00:01:28 UTC
Also happens in Fedora 40 with KDE6 manually installed from official repository. In VirtualBox.
Comment 3 Zamundaaa 2024-05-31 14:02:19 UTC
This is a bug in Qt, not in Plasma - it re-uses the activation token environment variable instead of requesting a new token  It should be fixed with https://codereview.qt-project.org/c/qt/qtwayland/+/519444, which activates the main window on show and thus clears the environment variable.
Comment 4 Alexey Ivanov 2024-06-03 07:09:38 UTC
> Qt 6.8 release plan
> Final Release  25.09.2024 	
Holly Molly it will take ONE YEAR for fix to land into Linux distributives.