Changeset 50598 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 26, 2014 10:16:51 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r50573 r50598 143 143 if (m_fIsFullscreenInvalidated) 144 144 { 145 /* Mark fullscreen mode valid again and re-enter it: */146 145 LogRel(("UIMachineLogicFullscreen::sltHandleNativeFullscreenDidExit: " 147 146 "Machine-window(s) exited invalidated fullscreen, enter again...\n")); 147 148 /* Mark fullscreen mode valid again: */ 148 149 m_fIsFullscreenInvalidated = false; 150 /* Reactivate 'presentation mode': */ 151 setPresentationModeEnabled(true); 152 /* Re-enter fullscreen mode: */ 149 153 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 150 154 pMachineWindow->showInNecessaryMode(); … … 158 162 else 159 163 { 160 /* Change visual-state to requested: */161 164 LogRel(("UIMachineLogicFullscreen::sltHandleNativeFullscreenDidExit: " 162 165 "Machine-window(s) exited fullscreen, changing visual-state to requested...\n")); 166 167 /* Change visual-state to requested: */ 163 168 UIVisualStateType type = uisession()->requestedVisualState(); 164 169 if (type == UIVisualStateType_Invalid) … … 348 353 void UIMachineLogicFullscreen::prepareOtherConnections() 349 354 { 350 /* Make sure 'presentation mode' is updated for Lion and previous: */ 355 /* Make sure 'presentation mode' preference handling 356 * is updated at runtime for Lion and previous: */ 351 357 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 352 358 connect(gEDataEvents, SIGNAL(sigPresentationModeChange(bool)), … … 379 385 380 386 #ifdef Q_WS_MAC 381 /* Activate 'presentation mode' for Lion and previous: */ 382 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 383 setPresentationModeEnabled(true); 387 /* Activate 'presentation mode': */ 388 setPresentationModeEnabled(true); 384 389 /* For ML and next: */ 385 else390 if (vboxGlobal().osRelease() > MacOSXRelease_Lion) 386 391 { 387 392 /* For all the machine-window(s): */ … … 429 434 430 435 #ifdef Q_WS_MAC 431 /* Deactivate 'presentation mode' for Lion and previous: */ 432 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 433 setPresentationModeEnabled(false); 436 /* Deactivate 'presentation mode': */ 437 setPresentationModeEnabled(false); 434 438 #endif/* Q_WS_MAC */ 435 439 } … … 471 475 void UIMachineLogicFullscreen::setPresentationModeEnabled(bool fEnabled) 472 476 { 473 /* Make sure this method is only used for Lion and previous: */ 474 AssertReturnVoid(vboxGlobal().osRelease() <= MacOSXRelease_Lion); 475 476 /* First check if we are on a screen which contains the Dock or the 477 * Menubar (which hasn't to be the same), only than the 478 * presentation mode have to be changed. */ 479 if ( fEnabled 480 && m_pScreenLayout->isHostTaskbarCovert()) 481 { 482 QString testStr = vboxGlobal().virtualBox().GetExtraData(GUI_PresentationModeEnabled).toLower(); 483 /* Default to false if it is an empty value */ 484 if (testStr.isEmpty() || testStr == "false") 485 SetSystemUIMode(kUIModeAllHidden, 0); 477 /* Should we enable it? */ 478 if (fEnabled) 479 { 480 /* For Lion and previous: */ 481 if (vboxGlobal().osRelease() <= MacOSXRelease_Lion) 482 { 483 /* Check if we have screen which contains the Dock or the Menubar (which hasn't to be the same), 484 * only than the 'presentation mode' have to be changed. */ 485 if (m_pScreenLayout->isHostTaskbarCovert()) 486 { 487 /* Load 'presentation mode' preference: */ 488 QString strPresentationMode = vboxGlobal().virtualBox().GetExtraData(GUI_PresentationModeEnabled).toLower(); 489 /* Default to 'false' if it is an empty value: */ 490 if (strPresentationMode.isEmpty() || strPresentationMode == "false") 491 SetSystemUIMode(kUIModeAllHidden, 0); 492 else 493 SetSystemUIMode(kUIModeAllSuppressed, 0); 494 } 495 } 496 /* For ML and next: */ 486 497 else 498 { 499 /* I am not sure we have to check anything here. 500 * Without 'presentation mode' native fullscreen works pretty bad, 501 * so we have to enable it anyway: */ 487 502 SetSystemUIMode(kUIModeAllSuppressed, 0); 488 } 489 else 490 SetSystemUIMode(kUIModeNormal, 0); 503 } 504 } 505 /* Should we disable it? */ 506 else SetSystemUIMode(kUIModeNormal, 0); 491 507 } 492 508
Note:
See TracChangeset
for help on using the changeset viewer.