From 5c517525fcc4bd62e9a3ef1defb08e8a5ed7389c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fauconnier?= Date: Tue, 11 Feb 2020 15:00:06 +0100 Subject: [PATCH] workaround for a really strange behavior on x11 (cf. comments).. --- src/core/UBDisplayManager.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index 14bba536..86ab38ae 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -231,7 +231,28 @@ void UBDisplayManager::positionScreens() { mControlWidget->hide(); mControlWidget->setGeometry(mDesktop->availableGeometry(mControlWidget)); + +#ifdef Q_OS_LINUX + /* + * in Gnome (X11), a very strange behavior randomly happens if this call is done at app start (the transparent drawing view of the desktop mode + * becomes somewhat a screenshot of the gnome desktop, so no interaction is possible through the view, and a second "screenshot" (or a second "thread" of the window ? ...) of the desktpop appears ... + * + * It seems to be already assumed by Qt though, so not sure if a qtbug should be created.. + * + * A known regression is that starting OpenBoard in DesktopMode directly may not handle perfectly until a screen mode change occurs (going to BoardMode and go back to Desktop Mode) + * (left palette closed by default and pen size way too large...) but it is less blocking than the other issue. + * + * Maybe To be able to start in DesktopMode should be reconsidered as it seems to work only on Windows at this time (or available only on Windows) + * + * https://doc.qt.io/qt-5/qwidget.html#showFullScreen + */ + if (qgetenv("XDG_SESSION_TYPE") != "x11") + { + UBPlatformUtils::showFullScreen(mControlWidget); + } +#else UBPlatformUtils::showFullScreen(mControlWidget); +#endif } if (mDisplayWidget && mDisplayScreenIndex > -1)