Changeset 84990 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 29, 2020 11:34:28 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r84790 r84990 4627 4627 strKey == GUI_StatusBar_IndicatorOrder) 4628 4628 emit sigStatusBarConfigurationChange(uMachineID); 4629 /* Visual state change: */ 4630 else if (strKey == GUI_Fullscreen || 4631 strKey == GUI_Seamless || 4632 strKey == GUI_Scale) 4633 emit sigVisualStateChange(uMachineID); 4629 4634 /* Scale-factor change: */ 4630 4635 else if (strKey == GUI_ScaleFactor) -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r84790 r84990 80 80 /** Notifies about VirtualBox Manager / Details pane options change. */ 81 81 void sigDetailsOptionsChange(DetailsElementType enmType); 82 83 /** Notifies about visual state change. */ 84 void sigVisualStateChange(const QUuid &uMachineID); 82 85 83 86 /** Notifies about menu-bar configuration change. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r82968 r84990 166 166 /* Remember new visual state: */ 167 167 m_visualState = visualState; 168 169 /* Save requested visual state: */ 170 gEDataManager->setRequestedVisualState(m_visualState, uiCommon().managedVMUuid()); 168 171 } 169 172 else -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r84696 r84990 1209 1209 } 1210 1210 1211 void UIMachineLogic::prepareOtherConnections() 1212 { 1213 /* Extra-data connections: */ 1214 connect(gEDataManager, &UIExtraDataManager::sigVisualStateChange, 1215 this, &UIMachineLogic::sltHandleVisualStateChange); 1216 } 1217 1211 1218 void UIMachineLogic::prepareHandlers() 1212 1219 { … … 2732 2739 } 2733 2740 2741 void UIMachineLogic::sltHandleVisualStateChange() 2742 { 2743 /* Check for new requested value stored in extra-data: */ 2744 const UIVisualStateType enmRequestedState = gEDataManager->requestedVisualState(uiCommon().managedVMUuid()); 2745 /* Check whether current value OR old requested value differs from new requested one. 2746 * That way we will NOT enter seamless mode instantly if it is already planned 2747 * but is not entered because we're waiting for a guest addition permission. */ 2748 if ( visualStateType() != enmRequestedState 2749 && uisession()->requestedVisualState() != enmRequestedState) 2750 { 2751 switch (enmRequestedState) 2752 { 2753 case UIVisualStateType_Normal: return sltChangeVisualStateToNormal(); 2754 case UIVisualStateType_Fullscreen: return sltChangeVisualStateToFullscreen(); 2755 case UIVisualStateType_Seamless: return sltChangeVisualStateToSeamless(); 2756 case UIVisualStateType_Scale: return sltChangeVisualStateToScale(); 2757 default: break; 2758 } 2759 } 2760 } 2761 2734 2762 void UIMachineLogic::typeHostKeyComboPressRelease(bool fToggleSequence) 2735 2763 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r82968 r84990 227 227 virtual void prepareActionGroups(); 228 228 virtual void prepareActionConnections(); 229 virtual void prepareOtherConnections() {}229 virtual void prepareOtherConnections(); 230 230 virtual void prepareHandlers(); 231 231 virtual void prepareMachineWindows() = 0; … … 353 353 void sltCloseRuntimeUI() { closeRuntimeUI(); } 354 354 355 /** Handles request for visual state change. */ 356 void sltHandleVisualStateChange(); 357 355 358 private: 356 359
Note:
See TracChangeset
for help on using the changeset viewer.