diff options
| author | David Redondo <qt@david-redondo.de> | 2022-02-23 11:12:17 +0100 |
|---|---|---|
| committer | David Redondo <qt@david-redondo.de> | 2022-07-25 18:29:49 +0200 |
| commit | c142fd8f686aa86e333cb3f30a4d3802155ecae5 (patch) | |
| tree | d84076fae08e3f5939995f49db259ffa27e53555 /src/gui/platform/unix/qgenericunixservices_p.h | |
| parent | f3cd57168731c67afd12d8071ead96eed1177b25 (diff) | |
Send parent_window handle to desktop portal
Sending parent_window to the portal allows it/the window manager to
better place portal dialogs in respect to the application window, for example
on top of it instead of a random position. For this use the focusWindow()
(if available) since the API in QDesktopServices does not take a QWindow
parameter. The file dialog has an explicit parent that can be used.
The introduced virtual is provided as a hook for the wayland platform
that already includes a class that inherits from QGenericUnixServices.
Change-Id: I5571f08d07e5a4e3ae32efd1f09e2727cec9e7c5
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices_p.h')
| -rw-r--r-- | src/gui/platform/unix/qgenericunixservices_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/platform/unix/qgenericunixservices_p.h b/src/gui/platform/unix/qgenericunixservices_p.h index 8d1228375fa..2ddba91a3a0 100644 --- a/src/gui/platform/unix/qgenericunixservices_p.h +++ b/src/gui/platform/unix/qgenericunixservices_p.h @@ -21,6 +21,8 @@ QT_BEGIN_NAMESPACE +class QWindow; + class Q_GUI_EXPORT QGenericUnixServices : public QPlatformServices { public: @@ -31,6 +33,8 @@ public: bool openUrl(const QUrl &url) override; bool openDocument(const QUrl &url) override; + virtual QString portalWindowIdentifier(QWindow *window); + private: QString m_webBrowser; QString m_documentLauncher; |
