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();
|