From 87e81498b73d59e8173953079ca5d0d73c5c302f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 4 Aug 2021 02:27:50 +0200 Subject: Fix window placement on wayland and add close buttons We explicitly set a parent. We can't assign to ApplicationWindow.transientParent though, only to Window.transientParent, so we just call setTransientParent in C++. --- src/ui/NhekoGlobalObject.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ui/NhekoGlobalObject.cpp') diff --git a/src/ui/NhekoGlobalObject.cpp b/src/ui/NhekoGlobalObject.cpp index fea10839..9e0d706b 100644 --- a/src/ui/NhekoGlobalObject.cpp +++ b/src/ui/NhekoGlobalObject.cpp @@ -6,6 +6,7 @@ #include #include +#include #include "Cache_p.h" #include "ChatPage.h" @@ -140,3 +141,9 @@ Nheko::openJoinRoomDialog() const MainWindow::instance()->openJoinRoomDialog( [](const QString &room_id) { ChatPage::instance()->joinRoom(room_id); }); } + +void +Nheko::reparent(QWindow *win) const +{ + win->setTransientParent(MainWindow::instance()->windowHandle()); +} -- cgit 1.4.1