Changeset 43395 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Sep 21, 2012 11:38:32 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r43169 r43395 29 29 #include "UIActionPoolRuntime.h" 30 30 #include "UIMachineLogic.h" 31 #include "UIMachineView.h" 31 32 #include "UIMachineWindow.h" 32 33 #include "UIMachineMenuBar.h" … … 148 149 } 149 150 151 void UISession::adjustGuestView() 152 { 153 foreach(UIMachineWindow *pMachineWindow, machineLogic()->machineWindows()) 154 { 155 bool bAdjustPosition = True; 156 UIVisualStateType visualStateType = machineLogic()->visualStateType(); 157 158 if (visualStateType == UIVisualStateType_Normal || 159 visualStateType == UIVisualStateType_Scale) 160 bAdjustPosition = True; 161 162 /* Normalize view's geometry: */ 163 pMachineWindow->machineView()->normalizeGeometry(bAdjustPosition); 164 } 165 } 166 150 167 void UISession::powerUp() 151 168 { … … 198 215 /* Show "Starting/Restoring" progress dialog: */ 199 216 if (isSaved()) 217 { 200 218 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_restore_90px.png", mainMachineWindow(), true, 0); 219 /* If restoring from saved state, guest MachineView 220 should be notified about host MachineWindow geometry change */ 221 adjustGuestView(); 222 223 } 201 224 else 202 225 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_start_90px.png", mainMachineWindow(), true); … … 1133 1156 foreach (const CHostNetworkInterface &iface, vboxGlobal().host().GetNetworkInterfaces()) 1134 1157 { 1135 availableInterfaceNames << iface.GetName();1158 availableInterfaceNames << iface.GetName(); 1136 1159 } 1137 1160 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r43138 r43395 229 229 void reinitMenuPool(); 230 230 bool preparePowerUp(); 231 void adjustGuestView(); 231 232 232 233 #ifdef VBOX_GUI_WITH_KEYS_RESET_HANDLER -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r42323 r43395 162 162 } 163 163 164 void UIMachineViewFullscreen::normalizeGeometry(bool /* fAdjustPosition */) 165 { 166 sltPerformGuestResize(workingArea().size()); 167 } 168 164 169 QRect UIMachineViewFullscreen::workingArea() const 165 170 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r39081 r43395 65 65 66 66 /* Private helpers: */ 67 void normalizeGeometry(bool /* fAdjustPosition */) {}67 void normalizeGeometry(bool /* fAdjustPosition */); 68 68 QRect workingArea() const; 69 69 QSize calculateMaxGuestSize() const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r43022 r43395 227 227 QWidget *pTopLevelWidget = window(); 228 228 229 /* Make no normalizeGeometry in case we are in manual resize mode or main window is maximized: */230 if (pTopLevelWidget->isMaximized())231 return;232 233 229 /* Calculate client window offsets: */ 234 230 QRect frameGeo = pTopLevelWidget->frameGeometry();
Note:
See TracChangeset
for help on using the changeset viewer.