Bug 498098 - Missing windows from Alt-Tab switcher on Wayland when the application opens a dialog on launch
Summary: Missing windows from Alt-Tab switcher on Wayland when the application opens a...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: 6.2.4
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-31 19:46 UTC by Balló György
Modified: 2025-01-22 19:04 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Balló György 2024-12-31 19:46:17 UTC
SUMMARY
Some specific applications that open a dialog together with the main window on launch are missing from the Alt-Tab switcher on Wayland after the dialog is closed. It appears again when I click on the main window, but it's impossible to switch to it using the Alt-Tab switcher until that. It happens only in the Plasma Wayland session.

STEPS TO REPRODUCE
1. Log in into Plasma Wayland session.
2. Launch Knights, KReversi or KSquares. The main window and a dialog appears.
3. Close the dialog.
4. Try to switch windows with the Alt-Tab switcher.

OBSERVED RESULT
The application is missing from the Alt-Tab switcher.

EXPECTED RESULT
The application should be visible in the Alt-Tab switcher.

SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Comment 1 David Edmundson 2025-01-02 23:10:30 UTC
Can reproduce.

The window was filtered out deliberately before, and then the main window never ended up in the workspace focusChain when the modal dialog is closed.

It seems the underlying bug is that when closing a modal dialog focus never passes to the transient parent immediately. That would implicitly fix this. 

It fixes itself when it loses/gains focus manually by clicking.
Comment 2 Bug Janitor Service 2025-01-16 08:55:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7020
Comment 3 Bug Janitor Service 2025-01-20 11:13:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/7038
Comment 4 David Edmundson 2025-01-21 16:24:01 UTC
Git commit 04d95319c2d1bfbd5fa0263ce44f35cc49144ece by David Edmundson.
Committed on 21/01/2025 at 14:39.
Pushed by davidedmundson into branch 'master'.

xdgshell: Fix passing focus to transient parent on close

When a modal dialog is closed we want to focus the parent.
This requires keeping information about grouping until
after workspace code is run.

M  +36   -0    autotests/integration/xdgshellwindow_test.cpp
M  +1    -1    src/xdgshellwindow.cpp

https://invent.kde.org/plasma/kwin/-/commit/04d95319c2d1bfbd5fa0263ce44f35cc49144ece
Comment 5 David Edmundson 2025-01-22 12:19:04 UTC
Git commit 8babbae2a9f03a120fa3cda32bc72850f33ad4d0 by David Edmundson, on behalf of David Edmundson.
Committed on 22/01/2025 at 11:56.
Pushed by davidedmundson into branch 'Plasma/6.3'.

xdgshell: Fix passing focus to transient parent on close

When a modal dialog is closed we want to focus the parent.
This requires keeping information about grouping until
after workspace code is run.


(cherry picked from commit 04d95319c2d1bfbd5fa0263ce44f35cc49144ece)

Co-authored-by: David Edmundson <kde@davidedmundson.co.uk>

M  +36   -0    autotests/integration/xdgshellwindow_test.cpp
M  +1    -1    src/xdgshellwindow.cpp

https://invent.kde.org/plasma/kwin/-/commit/8babbae2a9f03a120fa3cda32bc72850f33ad4d0