| 307 | |
| 308 | |
| 309 | void UBDesktopAnnotationController::showWindow() |
| 310 | { |
| 311 | mDesktopPalette->setDisplaySelectButtonVisible(true); |
| 312 | |
| 313 | connect(UBApplication::applicationController, SIGNAL(desktopMode(bool)) |
| 314 | , mDesktopPalette, SLOT(setDisplaySelectButtonVisible(bool))); |
| 315 | |
| 316 | mDesktopPalette->show(); |
| 317 | |
| 318 | bool showDisplay = UBSettings::settings()->webShowPageImmediatelyOnMirroredScreen->get().toBool(); |
| 319 | |
| 320 | mDesktopPalette->showHideClick(showDisplay); |
| 321 | mDesktopPalette->updateShowHideState(showDisplay); |
| 322 | |
| 323 | if (!mWindowPositionInitialized) |
| 324 | { |
| 325 | QRect desktopRect = UBApplication::displayManager->screenGeometry(ScreenRole::Desktop); |
| 326 | |
| 327 | mDesktopPalette->move(5, desktopRect.top() + 150); |
| 328 | |
| 329 | mWindowPositionInitialized = true; |
| 330 | mDesktopPalette->maximizeMe(); |
| 331 | } |
| 332 | |
| 333 | updateBackground(); |
| 334 | |
| 335 | mBoardStylusTool = UBDrawingController::drawingController()->stylusTool(); |
| 336 | |
| 337 | UBDrawingController::drawingController()->setStylusTool(mDesktopStylusTool); |
| 338 | |
| 339 | #ifndef Q_OS_LINUX |
| 340 | UBPlatformUtils::showFullScreen(mTransparentDrawingView); |
| 341 | #else |
| 342 | // this is necessary to avoid hiding the panels on Unity and Cinnamon |
| 343 | // if finer control is necessary, use qgetenv("XDG_CURRENT_DESKTOP") |
| 344 | mTransparentDrawingView->show(); |
| 345 | #endif |
| 346 | UBPlatformUtils::hideMenuBarAndDock(); |
| 347 | |
| 348 | mDesktopPalette->appear(); |
| 349 | |
| 350 | #ifdef UB_REQUIRES_MASK_UPDATE |
| 351 | updateMask(true); |
| 352 | #endif // UB_REQUIRES_MASK_UPDATE |
| 353 | } |
| 354 | |
| 355 | |
| 356 | void UBDesktopAnnotationController::close() |
no test coverage detected