restrict workaround to 10.13+ versions

preferencesAboutTextFull
Clément Fauconnier 5 years ago
parent 66baf6634e
commit e20a45167a
  1. 10
      src/desktop/UBDesktopAnnotationController.cpp

@ -84,7 +84,15 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
#ifdef Q_OS_OSX #ifdef Q_OS_OSX
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint); /* https://bugreports.qt.io/browse/QTBUG-81456 */
if (QOperatingSystemVersion::current().minorVersion() > 12) /* > Sierra */
{
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
}
else
{
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
}
#else #else
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint); mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
#endif #endif

Loading…
Cancel
Save