diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2023-02-11 20:06:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-11 20:06:57 +0000 |
commit | dedc3cb1f8ca9ca0a300a7d729b29c676c495d27 (patch) | |
tree | a757c0b16eb5e981b7fabc1d2c67bcc53d1ddb92 /src | |
parent | Remove some commands from the translations (diff) | |
parent | Make ImageOverlay set appropriate windowRole again (diff) | |
download | nheko-dedc3cb1f8ca9ca0a300a7d729b29c676c495d27.tar.xz |
Merge pull request #914 from Thulinma/imageOverlayRoleQml
Make ImageOverlay set appropriate windowRole again
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/NhekoGlobalObject.cpp | 8 | ||||
-rw-r--r-- | src/ui/NhekoGlobalObject.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/NhekoGlobalObject.cpp b/src/ui/NhekoGlobalObject.cpp index 99921d79..dcfaecf8 100644 --- a/src/ui/NhekoGlobalObject.cpp +++ b/src/ui/NhekoGlobalObject.cpp @@ -10,6 +10,8 @@ #include <QDesktopServices> #include <QStyle> #include <QUrl> +#include <QWindow> +#include <QtPlatformHeaders/QXcbWindowFunctions> #include "Cache_p.h" #include "ChatPage.h" @@ -178,3 +180,9 @@ Nheko::createRoom(bool space, emit ChatPage::instance()->createRoom(req); } + +void +Nheko::setWindowRole(QWindow *win, QString newRole) const +{ + QXcbWindowFunctions::setWmWindowRole(win, newRole.toUtf8()); +} diff --git a/src/ui/NhekoGlobalObject.h b/src/ui/NhekoGlobalObject.h index 690761a5..5a2dda07 100644 --- a/src/ui/NhekoGlobalObject.h +++ b/src/ui/NhekoGlobalObject.h @@ -72,6 +72,7 @@ public: return new AliasEditingModel(room_id_.toStdString()); } Q_INVOKABLE void setTransientParent(QWindow *window, QWindow *parentWindow) const; + Q_INVOKABLE void setWindowRole(QWindow *win, QString newRole) const; public slots: void updateUserProfile(); |