From 036db9d22d7dd15e07c0bdd706f0a24cf0d87d50 Mon Sep 17 00:00:00 2001 From: Felix Weilbach Date: Tue, 13 Jul 2021 10:11:32 +0200 Subject: [PATCH] Position main dialog on at tray icon if not a regular window Signed-off-by: Felix Weilbach --- src/gui/systray.cpp | 5 ++--- src/gui/tray/Window.qml | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 6b9f46ee2..1f4760b35 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -272,9 +272,8 @@ void Systray::pauseResumeSync() void Systray::positionWindow(QQuickWindow *window) const { - window->setScreen(currentScreen()); - - if (useNormalWindow()) { + if (!useNormalWindow()) { + window->setScreen(currentScreen()); const auto position = computeWindowPosition(window->width(), window->height()); window->setPosition(position); } diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index 48e188db2..e818550a2 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -57,10 +57,7 @@ Window { onShowWindow: { accountMenu.close(); appsMenu.close(); - - if (!Systray.useNormalWindow) { - Systray.positionWindow(trayWindow); - } + Systray.positionWindow(trayWindow); trayWindow.show(); trayWindow.raise();