- Timestamp:
- Jun 16, 2015 10:20:52 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101060
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r56145 r56443 338 338 foreach(UIMachineWindow *pMachineWindow, machineWindows()) 339 339 pMachineWindow->adjustMachineViewSize(); 340 } 341 342 void UIMachineLogic::sendMachineWindowsSizeHints() 343 { 344 /* By default, the only thing we need is to 345 * send machine-view(s) size-hint(s) to the guest: */ 346 foreach(UIMachineWindow *pMachineWindow, machineWindows()) 347 pMachineWindow->sendMachineViewSizeHint(); 340 348 } 341 349 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r56098 r56443 128 128 virtual void adjustMachineWindowsGeometry(); 129 129 130 /** Send machine-window(s) size-hint(s) to the guest. */ 131 virtual void sendMachineWindowsSizeHints(); 132 130 133 /* Wrapper to open Machine settings / Network page: */ 131 134 void openNetworkSettingsDialog() { sltOpenNetworkSettingsDialog(); } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r56321 r56443 93 93 /* Public setters: */ 94 94 virtual void setGuestAutoresizeEnabled(bool /* fEnabled */) {} 95 96 /** Send saved guest-screen size-hint to the guest. 97 * @note Reimplemented in sub-classes. Base implementation does nothing. */ 98 virtual void resendSizeHint() {} 95 99 96 100 /** Adjusts guest-screen size to correspond current visual-style. -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r56126 r56443 228 228 /* We need to adjust guest-screen size if necessary: */ 229 229 machineView()->adjustGuestScreenSize(); 230 } 231 232 void UIMachineWindow::sendMachineViewSizeHint() 233 { 234 /* Send machine-view size-hint to the guest: */ 235 machineView()->resendSizeHint(); 230 236 } 231 237 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r55401 r56443 84 84 /** Adjusts machine-view size to correspond current machine-window size. */ 85 85 virtual void adjustMachineViewSize(); 86 87 /** Sends machine-view size-hint to the guest. */ 88 virtual void sendMachineViewSizeHint(); 86 89 87 90 #ifdef VBOX_WITH_MASKED_SEAMLESS -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r56133 r56443 287 287 } 288 288 else 289 { 289 290 msgCenter().showModalProgressDialog(progress, machineName(), ":/progress_start_90px.png"); 291 /* After VM start, machine-window(s) size-hint(s) should be sent: */ 292 machineLogic()->sendMachineWindowsSizeHints(); 293 } 290 294 291 295 /* Check for progress failure: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r55939 r56443 137 137 void UIMachineViewNormal::resendSizeHint() 138 138 { 139 const QSize sizeHint = guestSizeHint(); 139 /* Get the last size hint, taking the scale factor into account. */ 140 const QSize sizeHint = scaledBackward(guestSizeHint()); 140 141 LogRel(("GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen %d to %dx%d\n", 141 142 (int)screenId(), sizeHint.width(), sizeHint.height())); 142 143 /* Temporarily restrict the size to prevent a brief resize to the 143 144 * framebuffer dimensions (see @a UIMachineView::sizeHint()) before 144 * the following resize() is acted upon. */ 145 * the following resize() is acted upon. Expand current limitations 146 * too. */ 145 147 setMaximumSize(sizeHint); 146 148 m_sizeHintOverride = sizeHint; 147 sltPerformGuestResize(sizeHint);149 display().SetVideoModeHint(screenId(), true, false, 0, 0, sizeHint.width(), sizeHint.height(), 0); 148 150 } 149 151 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r55939 r56443 153 153 void UIMachineViewScale::resendSizeHint() 154 154 { 155 const QSize sizeHint = guestSizeHint();155 const QSize sizeHint = scaledBackward(guestSizeHint()); 156 156 LogRel(("GUI: UIMachineViewScale::resendSizeHint: Restoring guest size-hint for screen %d to %dx%d\n", 157 157 (int)screenId(), sizeHint.width(), sizeHint.height())); 158 sltPerformGuestResize(sizeHint); 158 /* Expand current limitations: */ 159 setMaxGuestSize(sizeHint); 160 display().SetVideoModeHint(screenId(), true, false, 0, 0, sizeHint.width(), sizeHint.height(), 0); 159 161 } 160 162
Note:
See TracChangeset
for help on using the changeset viewer.