- Timestamp:
- May 29, 2012 3:50:49 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r41122 r41486 612 612 #endif /* VBOX_WITH_DEBUGGER_GUI */ 613 613 614 bool UIMachineWindow::shouldWeShowWindow() const 615 { 616 /* By default, every window should be shown: */ 617 bool fResult = true; 618 /* But if machine is 'turned off': */ 619 if (uisession()->isTurnedOff()) 620 { 621 /* If machine is in 'saved' state: */ 622 if (uisession()->isSaved()) 623 { 624 /* We are getting shown-state from saved-state: */ 625 BOOL fEnabled = true; 626 ULONG guestOriginX = 0, guestOriginY = 0, guestWidth = 0, guestHeight = 0; 627 machine().QuerySavedGuestScreenInfo(m_uScreenId, guestOriginX, guestOriginY, guestWidth, guestHeight, fEnabled); 628 fResult = fEnabled; 629 } 630 /* If machine is in 'powered off', 'teleported' or 'aborted' state: */ 631 else 632 { 633 /* Shown-state is 'enabled' only for 1st monitor: */ 634 fResult = m_uScreenId == 0; 635 } 636 } 637 return fResult; 638 } 639 614 640 /* static */ 615 641 Qt::WindowFlags UIMachineWindow::windowFlags(UIVisualStateType visualStateType) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r41122 r41486 109 109 110 110 /* Helpers: */ 111 bool shouldWeShowWindow() const; 111 112 const QString& defaultWindowTitle() const { return m_strWindowTitlePrefix; } 112 113 static Qt::WindowFlags windowFlags(UIVisualStateType visualStateType); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r41333 r41486 165 165 void UIMachineWindowFullscreen::showInNecessaryMode() 166 166 { 167 /* Make sure we really have to show window: */ 168 BOOL fEnabled = true; 169 ULONG guestOriginX = 0, guestOriginY = 0, guestWidth = 0, guestHeight = 0; 170 machine().QuerySavedGuestScreenInfo(m_uScreenId, guestOriginX, guestOriginY, guestWidth, guestHeight, fEnabled); 171 if (fEnabled) 167 /* Show window if we have to: */ 168 if (shouldWeShowWindow()) 172 169 { 173 170 /* Make sure the window is placed on valid screen -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r41333 r41486 505 505 void UIMachineWindowNormal::showInNecessaryMode() 506 506 { 507 /* Make sure we really have to show window: */ 508 BOOL fEnabled = true; 509 ULONG guestOriginX = 0, guestOriginY = 0, guestWidth = 0, guestHeight = 0; 510 machine().QuerySavedGuestScreenInfo(m_uScreenId, guestOriginX, guestOriginY, guestWidth, guestHeight, fEnabled); 511 if (fEnabled) 507 /* Show window if we have to: */ 508 if (shouldWeShowWindow()) 512 509 show(); 513 510 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r41333 r41486 199 199 void UIMachineWindowScale::showInNecessaryMode() 200 200 { 201 /* Make sure we really have to show window: */ 202 BOOL fEnabled = true; 203 ULONG guestOriginX = 0, guestOriginY = 0, guestWidth = 0, guestHeight = 0; 204 machine().QuerySavedGuestScreenInfo(m_uScreenId, guestOriginX, guestOriginY, guestWidth, guestHeight, fEnabled); 205 if (fEnabled) 201 /* Show window if we have to: */ 202 if (shouldWeShowWindow()) 206 203 show(); 207 204 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r41334 r41486 219 219 void UIMachineWindowSeamless::showInNecessaryMode() 220 220 { 221 /* Make sure we really have to show window: */ 222 BOOL fEnabled = true; 223 ULONG guestOriginX = 0, guestOriginY = 0, guestWidth = 0, guestHeight = 0; 224 machine().QuerySavedGuestScreenInfo(m_uScreenId, guestOriginX, guestOriginY, guestWidth, guestHeight, fEnabled); 225 if (fEnabled) 221 /* Show window if we have to: */ 222 if (shouldWeShowWindow()) 226 223 { 227 224 /* Show manually maximized window: */
Note:
See TracChangeset
for help on using the changeset viewer.