summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-08-31 20:44:21 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-08-31 20:44:21 +0200
commit01fd5e6b61828ec07f5be710523f0a6f0bb20a1a (patch)
tree2de1ce99f6ed17a858d460749f61b2399ef5c834 /src
parentFix empty widgets still being shown (diff)
downloadnheko-01fd5e6b61828ec07f5be710523f0a6f0bb20a1a.tar.xz
Unset the transient parent on separate chat windows
relates to #1168
Diffstat (limited to 'src')
-rw-r--r--src/ui/NhekoGlobalObject.cpp7
-rw-r--r--src/ui/NhekoGlobalObject.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/NhekoGlobalObject.cpp b/src/ui/NhekoGlobalObject.cpp
index 5891f8cd..ce094205 100644
--- a/src/ui/NhekoGlobalObject.cpp
+++ b/src/ui/NhekoGlobalObject.cpp
@@ -129,6 +129,13 @@ Nheko::logout() const
 }
 
 void
+Nheko::setTransientParent(QWindow *window, QWindow *parentWindow) const
+{
+    if (window)
+        window->setTransientParent(parentWindow);
+}
+
+void
 Nheko::createRoom(QString name, QString topic, QString aliasLocalpart, bool isEncrypted, int preset)
 {
     mtx::requests::CreateRoom req;
diff --git a/src/ui/NhekoGlobalObject.h b/src/ui/NhekoGlobalObject.h
index c8c6f667..a63c7846 100644
--- a/src/ui/NhekoGlobalObject.h
+++ b/src/ui/NhekoGlobalObject.h
@@ -8,6 +8,7 @@
 #include <QFontDatabase>
 #include <QObject>
 #include <QPalette>
+#include <QWindow>
 
 #include "AliasEditModel.h"
 #include "PowerlevelsEditModels.h"
@@ -65,6 +66,7 @@ public:
     {
         return new AliasEditingModel(room_id_.toStdString());
     }
+    Q_INVOKABLE void setTransientParent(QWindow *window, QWindow *parentWindow) const;
 
 public slots:
     void updateUserProfile();