Bug 405588 - Declarative config modules don't set proper transient parent for dialogs
Summary: Declarative config modules don't set proper transient parent for dialogs
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2019-03-18 09:34 UTC by Vlad Zahorodnii
Modified: 2020-10-12 22:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2019-03-18 09:34:15 UTC
SUMMARY

https://phabricator.kde.org/D18703#419211:
We open the configuration UI with the QQuickView as the transient. This is not a top level as it's embedded in the KCM.

In this case QtWayland does try to look for parents or transientParents of the window.
But as this QQuickView is an offscreen surface it doesn't even have a parent or transient parent. QtWayland has nothing to go on.

This comes up in multiple places, such as GHNS in every QtQuick KCM

The more interesting question isn't why wayland doen't work, but why x does work.

https://phabricator.kde.org/D18703#419224
It works on X11 because dialogs become group transients (this is both a feature and a bug).

STEPS TO REPRODUCE
1. Open Window Decorations KCM on Wayland;
2. Click "Get New Window Decorations..." button;
3. Click on the System Settings window.

OBSERVED RESULT
System Settings is raised above the dialog.

EXPECTED RESULT
System Settings windows stays below the dialog.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.15.2
KDE Frameworks Version: 5.56
Qt Version: 5.12.1

ADDITIONAL INFORMATION
The issue is not noticeable on X11 because the dialogs become group transients (though in most cases we don't want that).
Comment 1 David Edmundson 2019-03-18 10:07:02 UTC
FWIW, there is a workaround via 
QQuickRenderControl::renderWindowFor(embeddedWindow) but that would mean adding a code path everywhere. I can't find a way to do this generically.