|
|
|
@ -86,19 +86,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB |
|
|
|
|
mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); |
|
|
|
|
#endif //Q_OS_OSX
|
|
|
|
|
|
|
|
|
|
#if defined(Q_OS_OSX) && (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) |
|
|
|
|
/* 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 |
|
|
|
|
mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint); |
|
|
|
|
#endif |
|
|
|
|
mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); |
|
|
|
|
mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); |
|
|
|
|
|
|
|
|
@ -124,7 +112,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB |
|
|
|
|
connect( UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(keyboardActivated(bool)),
|
|
|
|
|
mTransparentDrawingView, SLOT(virtualKeyboardActivated(bool))); |
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_LINUX |
|
|
|
|
#ifdef UB_REQUIRES_MASK_UPDATE |
|
|
|
|
connect(UBApplication::boardController->paletteManager()->mKeyboardPalette, SIGNAL(moved(QPoint)), this, SLOT(refreshMask())); |
|
|
|
|
connect(UBApplication::mainWindow->actionVirtualKeyboard, SIGNAL(triggered(bool)), this, SLOT(refreshMask())); |
|
|
|
|
connect(mDesktopPalette,SIGNAL(refreshMask()), this, SLOT(refreshMask())); |
|
|
|
@ -179,7 +167,7 @@ UBDesktopAnnotationController::UBDesktopAnnotationController(QObject *parent, UB |
|
|
|
|
connect(&mHoldTimerMarker, SIGNAL(timeout()), this, SLOT(markerActionReleased())); |
|
|
|
|
connect(&mHoldTimerEraser, SIGNAL(timeout()), this, SLOT(eraserActionReleased())); |
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_LINUX |
|
|
|
|
#ifdef UB_REQUIRES_MASK_UPDATE |
|
|
|
|
connect(mDesktopPalette, SIGNAL(moving()), this, SLOT(refreshMask())); |
|
|
|
|
connect(UBApplication::boardController->paletteManager()->rightPalette(), SIGNAL(resized()), this, SLOT(refreshMask())); |
|
|
|
|
connect(UBApplication::boardController->paletteManager()->addItemPalette(), SIGNAL(closed()), this, SLOT(refreshMask())); |
|
|
|
@ -359,9 +347,9 @@ void UBDesktopAnnotationController::showWindow() |
|
|
|
|
|
|
|
|
|
mDesktopPalette->appear(); |
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_LINUX |
|
|
|
|
#ifdef UB_REQUIRES_MASK_UPDATE |
|
|
|
|
updateMask(true); |
|
|
|
|
#endif |
|
|
|
|
#endif // UB_REQUIRES_MASK_UPDATE
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -404,9 +392,9 @@ void UBDesktopAnnotationController::updateBackground() |
|
|
|
|
|| UBDrawingController::drawingController()->stylusTool() == UBStylusTool::Selector) |
|
|
|
|
{ |
|
|
|
|
newBrush = QBrush(Qt::transparent); |
|
|
|
|
#ifdef Q_OS_LINUX |
|
|
|
|
#ifdef UB_REQUIRES_MASK_UPDATE |
|
|
|
|
updateMask(true); |
|
|
|
|
#endif |
|
|
|
|
#endif //UB_REQUIRES_MASK_UPDATE
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
@ -415,9 +403,9 @@ void UBDesktopAnnotationController::updateBackground() |
|
|
|
|
#else |
|
|
|
|
newBrush = QBrush(QColor(127, 127, 127, 1)); |
|
|
|
|
#endif |
|
|
|
|
#ifdef Q_OS_LINUX |
|
|
|
|
#ifdef UB_REQUIRES_MASK_UPDATE |
|
|
|
|
updateMask(false); |
|
|
|
|
#endif |
|
|
|
|
#endif //UB_REQUIRES_MASK_UPDATE
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mTransparentDrawingScene && mTransparentDrawingScene->backgroundBrush() != newBrush) |
|
|
|
|