- Timestamp:
- May 23, 2017 9:55:30 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r66588 r67031 312 312 /* Send new size-hint to the guest: */ 313 313 LogRel(("GUI: UIMachineView::sltPerformGuestResize: " 314 "Sending guest size-hint to screen %d as %dx%d \n",314 "Sending guest size-hint to screen %d as %dx%d if necessary\n", 315 315 (int)screenId(), size.width(), size.height())); 316 316 … … 318 318 if (gEDataManager->autoMountGuestScreensEnabled(vboxGlobal().managedVMUuid())) 319 319 { 320 /* If host and guest have same opinion about guest-screen visibility: */ 321 if (uisession()->isScreenVisible(screenId()) == uisession()->isScreenVisibleHostDesires(screenId())) 320 /* Do not send a hint if nothing has changed to prevent the guest being notified about its own changes: */ 321 if ( (int)m_pFrameBuffer->width() != size.width() || (int)m_pFrameBuffer->height() != size.height() 322 || uisession()->isScreenVisible(screenId()) != uisession()->isScreenVisibleHostDesires(screenId())) 323 { 324 /* If host and guest have same opinion about guest-screen visibility: */ 325 if (uisession()->isScreenVisible(screenId()) == uisession()->isScreenVisibleHostDesires(screenId())) 326 display().SetVideoModeHint(screenId(), 327 uisession()->isScreenVisible(screenId()), 328 false, 0, 0, size.width(), size.height(), 0); 329 /* If host desires to have guest-screen disabled and guest-screen is enabled, retrying: */ 330 else if (!uisession()->isScreenVisibleHostDesires(screenId())) 331 display().SetVideoModeHint(screenId(), false, false, 0, 0, 0, 0, 0); 332 /* If host desires to have guest-screen enabled and guest-screen is disabled, retrying: */ 333 else if (uisession()->isScreenVisibleHostDesires(screenId())) 334 display().SetVideoModeHint(screenId(), true, false, 0, 0, size.width(), size.height(), 0); 335 } 336 } 337 /* If auto-mount of guest-screens (auto-pilot) disabled: */ 338 else 339 { 340 /* Do not send a hint if nothing has changed to prevent the guest being notified about its own changes: */ 341 if ((int)m_pFrameBuffer->width() != size.width() || (int)m_pFrameBuffer->height() != size.height()) 322 342 display().SetVideoModeHint(screenId(), 323 343 uisession()->isScreenVisible(screenId()), 324 344 false, 0, 0, size.width(), size.height(), 0); 325 /* If host desires to have guest-screen disabled and guest-screen is enabled, retrying: */326 else if (!uisession()->isScreenVisibleHostDesires(screenId()))327 display().SetVideoModeHint(screenId(), false, false, 0, 0, 0, 0, 0);328 /* If host desires to have guest-screen enabled and guest-screen is disabled, retrying: */329 else if (uisession()->isScreenVisibleHostDesires(screenId()))330 display().SetVideoModeHint(screenId(), true, false, 0, 0, size.width(), size.height(), 0);331 }332 /* If auto-mount of guest-screens (auto-pilot) disabled: */333 else334 {335 display().SetVideoModeHint(screenId(),336 uisession()->isScreenVisible(screenId()),337 false, 0, 0, size.width(), size.height(), 0);338 345 } 339 346 }
Note:
See TracChangeset
for help on using the changeset viewer.