Changeset 50647 in vbox
- Timestamp:
- Feb 28, 2014 8:22:11 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92545
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r50646 r50647 515 515 bool UIMachineLogicFullscreen::shouldWeInvalidateFullscreenMode() const 516 516 { 517 /* Prepare result: */518 bool fSomethingInvalid = false;519 520 517 /* Enumerate windows: */ 521 518 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 522 519 { 520 /* Cast to 'fullscreen' window: */ 521 UIMachineWindowFullscreen *pFullscreenMachineWindow = 522 qobject_cast<UIMachineWindowFullscreen*>(pMachineWindow); 523 /* Ignore window(s) which are in 'fullscreen transition': */ 524 if (pFullscreenMachineWindow->isInFullscreenTransition()) 525 continue; 526 523 527 /* Get screen ID: */ 524 528 ulong uScreenID = pMachineWindow->screenId(); … … 533 537 if ( uisession()->isScreenVisible(uScreenID) 534 538 && hasHostScreenForGuestScreen(uScreenID)) 535 { 536 fSomethingInvalid = true; 537 break; 538 } 539 return true; 539 540 } 540 541 /* Check window which is in fullscreen: */ … … 545 546 if ( !uisession()->isScreenVisible(uScreenID) 546 547 || !hasHostScreenForGuestScreen(uScreenID)) 547 { 548 fSomethingInvalid = true; 549 break; 550 } 548 return true; 551 549 /* Check if that window should be located 552 550 * on another host-screen than currently. */ 553 551 if (hostScreenForGuestScreen((int)uScreenID) != 554 552 QApplication::desktop()->screenNumber(pMachineWindow)) 555 { 556 fSomethingInvalid = true; 557 break; 558 } 553 return true; 559 554 } 560 555 } 561 556 } 562 557 563 /* Return result: */564 return f SomethingInvalid;558 /* False by default: */ 559 return false; 565 560 } 566 561 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r50634 r50647 44 44 , m_pMainMenu(0) 45 45 , m_pMiniToolBar(0) 46 #ifdef Q_WS_MAC 47 , m_fIsInFullscreenTransition(false) 48 #endif /* Q_WS_MAC */ 46 49 { 47 50 } … … 53 56 AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion); 54 57 55 /* Handle arrived notification: */58 /* Log all arrived notifications: */ 56 59 LogRel(("UIMachineWindowFullscreen::handleNativeNotification: Notification '%s' received.\n", 57 60 strNativeNotificationName.toAscii().constData())); 61 58 62 /* Handle 'NSWindowDidEnterFullScreenNotification' notification: */ 59 63 if (strNativeNotificationName == "NSWindowDidEnterFullScreenNotification") 60 64 { 65 /* Mark window transition complete: */ 66 m_fIsInFullscreenTransition = false; 61 67 LogRel(("UIMachineWindowFullscreen::handleNativeNotification: " 62 68 "Native fullscreen mode entered, notifying listener...\n")); … … 66 72 else if (strNativeNotificationName == "NSWindowDidExitFullScreenNotification") 67 73 { 74 /* Mark window transition complete: */ 75 m_fIsInFullscreenTransition = false; 68 76 LogRel(("UIMachineWindowFullscreen::handleNativeNotification: " 69 77 "Native fullscreen mode exited, notifying listener...\n")); … … 110 118 if (!pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId)) 111 119 return; 120 121 /* Mark window 'transitioned to fullscreen': */ 122 m_fIsInFullscreenTransition = true; 112 123 113 124 /* Enter native fullscreen mode if necessary: */ … … 121 132 /* Make sure this slot is called only under ML and next: */ 122 133 AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion); 134 135 /* Mark window 'transitioned from fullscreen': */ 136 m_fIsInFullscreenTransition = true; 123 137 124 138 /* Exit native fullscreen mode if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r50634 r50647 33 33 #ifdef RT_OS_DARWIN 34 34 signals: 35 /** Mac OS X: Notifies listener about native fullscreen entering. */35 /** Mac OS X: Notifies listener about native 'fullscreen' entered. */ 36 36 void sigNotifyAboutNativeFullscreenDidEnter(); 37 /** Mac OS X: Notifies listener about native fullscreen exiting. */37 /** Mac OS X: Notifies listener about native 'fullscreen' exited. */ 38 38 void sigNotifyAboutNativeFullscreenDidExit(); 39 39 #endif /* RT_OS_DARWIN */ … … 45 45 46 46 #ifdef Q_WS_MAC 47 /** Mac OS X: Handles native notifications @a strNativeNotificationName for fullscreenwindow. */47 /** Mac OS X: Handles native notifications @a strNativeNotificationName for 'fullscreen' window. */ 48 48 void handleNativeNotification(const QString &strNativeNotificationName); 49 /** Mac OS X: Returns whether window is in 'fullscreen' transition. */ 50 bool isInFullscreenTransition() const { return m_fIsInFullscreenTransition; } 49 51 #endif /* Q_WS_MAC */ 50 52 … … 87 89 UIRuntimeMiniToolBar *m_pMiniToolBar; 88 90 91 #ifdef Q_WS_MAC 92 /** Mac OS X: Reflects whether window is in 'fullscreen' transition. */ 93 bool m_fIsInFullscreenTransition; 94 /** Mac OS X: Allows 'fullscreen' API access: */ 95 friend class UIMachineLogicFullscreen; 96 #endif /* Q_WS_MAC */ 97 89 98 /* Factory support: */ 90 99 friend class UIMachineWindow;
Note:
See TracChangeset
for help on using the changeset viewer.