From 7dc58b7e606e77725232ed06355780a5ab6f1fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Mon, 29 Apr 2019 09:36:18 +0200 Subject: [PATCH] screens overlapping on ubuntu 18 in some cases --- src/core/UBDisplayManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index d0fa2014..14bba536 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -222,16 +222,15 @@ void UBDisplayManager::adjustScreens(int screen) void UBDisplayManager::positionScreens() { - if(mDesktopWidget && mControlScreenIndex > -1) { mDesktopWidget->hide(); - mDesktopWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex)); + mDesktopWidget->setGeometry(mDesktop->availableGeometry(mDesktopWidget)); } if (mControlWidget && mControlScreenIndex > -1) { mControlWidget->hide(); - mControlWidget->setGeometry(mDesktop->screenGeometry(mControlScreenIndex)); + mControlWidget->setGeometry(mDesktop->availableGeometry(mControlWidget)); UBPlatformUtils::showFullScreen(mControlWidget); }