diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml
index fe61b8d5..d920b97b 100644
--- a/resources/qml/RoomList.qml
+++ b/resources/qml/RoomList.qml
@@ -74,7 +74,10 @@ Page {
property var room: null
property var roomPreview: null
- Component.onCompleted: MainWindow.addPerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW)
+ Component.onCompleted: {
+ MainWindow.addPerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW);
+ Nheko.setTransientParent(roomWindowW, null);
+ }
Component.onDestruction: MainWindow.removePerRoomWindow(room.roomId || roomPreview.roomid, roomWindowW)
height: 650
@@ -84,8 +87,7 @@ Page {
palette: Nheko.colors
color: Nheko.colors.window
title: room.plainRoomName
- modality: Qt.NonModal
- flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
+ //flags: Qt.Window | Qt.WindowCloseButtonHint | Qt.WindowTitleHint
Shortcut {
sequence: StandardKey.Cancel
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();
|