setDesktopMode to correct value + uncomment some osx code on an old bug

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent 2136f077ff
commit e05d686949
  1. 2
      src/board/UBDrawingController.h
  2. 3
      src/core/UBApplicationController.cpp
  3. 4
      src/frameworks/UBPlatformUtils_mac.mm

@ -66,7 +66,7 @@ class UBDrawingController : public QObject
UBAbstractDrawRuler* mActiveRuler; UBAbstractDrawRuler* mActiveRuler;
void setInDestopMode(bool mode){ void setInDesktopMode(bool mode){
mIsDesktopMode = mode; mIsDesktopMode = mode;
} }

@ -371,6 +371,7 @@ void UBApplicationController::showBoard()
mIsShowingDesktop = false; mIsShowingDesktop = false;
UBPlatformUtils::setDesktopMode(false); UBPlatformUtils::setDesktopMode(false);
UBDrawingController::drawingController()->setInDesktopMode(false);
mUninoteController->hideWindow(); mUninoteController->hideWindow();
@ -473,7 +474,7 @@ void UBApplicationController::showDesktop(bool dontSwitchFrontProcess)
UBPlatformUtils::bringPreviousProcessToFront(); UBPlatformUtils::bringPreviousProcessToFront();
} }
UBDrawingController::drawingController()->setInDestopMode(true); UBDrawingController::drawingController()->setInDesktopMode(true);
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
} }

@ -90,10 +90,10 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
@try { @try {
// temporarily disabled due to bug: when switching to desktop mode (and calling this), // temporarily disabled due to bug: when switching to desktop mode (and calling this),
// openboard switches right back to the board mode. clicking again on desktop mode works. // openboard switches right back to the board mode. clicking again on desktop mode works.
/*if (desktop) { if (desktop) {
[NSApp setPresentationOptions:NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock]; [NSApp setPresentationOptions:NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock];
} }
else*/ else
[NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock]; [NSApp setPresentationOptions:NSApplicationPresentationHideMenuBar | NSApplicationPresentationHideDock];
} }

Loading…
Cancel
Save