Priority: P2: Important
Affects Version/s: 5.7.0
Fix Version/s: None
Component/s: QPA: Wayland
A transient QWidget with Qt::WA_ShowWithoutActivating attribute set request the wl_shell_surface_set_transient without the inactive flag. This results in the Compositor passing keyboard focus to the widget. Depending on the implementation of the widget this can result in the widget just closing again.
1. Use Plasma/Wayland session
2. Open e.g. kwrite
3. Click File open
4. Try to navigate to a directory using the classic file filter bar
Observe that the autocompletion list for directories always closes directly.
A snippet from WAYLAND_DEBUG of the problematic area:
We can see from the snippet that on key press a new transient surface is mapped with flag "0" for the surface which currently has keyboard focus. The compositor now passes keyboard focus to that surface, which results in the client to unmap the newly opened surface again.
A git grep of _q_showWithoutActivating and WA_ShowWithoutActivating does not give any results, while there is code specific to that in other qpa plugins:
|For Gerrit Dashboard: QTBUG-55403|
|168676,1||Pass TRANSIENT_INACTIVE flag for windows with WA_ShowWithoutActivating||5.7||qt/qtwayland||Status: ABANDONED||0||0|
|168738,2||Pass TRANSIENT_INACTIVE flag for windows with WA_ShowWithoutActivating||5.6||qt/qtwayland||Status: MERGED||+2||0|