Changeset 61748 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 17, 2016 2:32:26 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 108135
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r61726 r61748 319 319 void UIMachineWindowFullscreen::placeOnScreen() 320 320 { 321 /* Make sure this window has fullscreen logic: */ 322 UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic()); 323 AssertPtrReturnVoid(pFullscreenLogic); 324 321 325 /* Get corresponding host-screen: */ 322 const int iHostScreen = qobject_cast<UIMachineLogicFullscreen*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId);326 const int iHostScreen = pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId); 323 327 /* And corresponding working area: */ 324 328 const QRect workingArea = vboxGlobal().screenGeometry(iHostScreen); … … 326 330 327 331 #if defined(VBOX_WS_MAC) 328 329 /* Make sure this window has fullscreen logic: */330 UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic());331 AssertPtrReturnVoid(pFullscreenLogic);332 332 333 333 /* Move window to the appropriate position: */ … … 388 388 #elif defined(VBOX_WS_X11) 389 389 390 /* Determine whether we should use the native full-screen mode: */ 391 const bool fUseNativeFullScreen = VBoxGlobal::supportsFullScreenMonitorsProtocolX11() && 392 !gEDataManager->legacyFullscreenModeRequested(); 393 if (fUseNativeFullScreen) 394 { 395 /* Tell recent window managers which host-screen this window should be mapped to: */ 396 VBoxGlobal::setFullScreenMonitorX11(this, pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId)); 397 398 /* If there is a mini-toolbar: */ 399 if (m_pMiniToolBar) 400 { 401 /* Tell recent window managers which host-screen this mini-toolbar should be mapped to: */ 402 VBoxGlobal::setFullScreenMonitorX11(m_pMiniToolBar, pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId)); 403 } 404 } 405 390 406 /* Set appropriate geometry for window: */ 391 407 resize(workingArea.size()); … … 526 542 return; 527 543 528 /* If WM doesn't support native stuff, we need to call for placeOnScreen(): */529 const bool fUseNativeFullScreen = VBoxGlobal::supportsFullScreenMonitorsProtocolX11() &&530 !gEDataManager->legacyFullscreenModeRequested();531 if (!fUseNativeFullScreen)532 {533 /* Make sure window have appropriate geometry: */534 placeOnScreen();535 }536 537 544 /* Show window: */ 538 545 showFullScreen(); … … 545 552 } 546 553 554 /* Make sure window have appropriate geometry: */ 555 placeOnScreen(); 556 547 557 /* Restore minimized state if necessary: */ 548 558 if (m_fWasMinimized) … … 550 560 m_fWasMinimized = false; 551 561 showMinimized(); 552 }553 554 /* If WM supports native stuff, we need to map window to corresponding host-screen. */555 if (fUseNativeFullScreen)556 {557 /* Tell recent window managers which host-screen this window should be mapped to: */558 VBoxGlobal::setFullScreenMonitorX11(this, pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId));559 560 /* If there is a mini-toolbar: */561 if (m_pMiniToolBar)562 {563 /* Tell recent window managers which host-screen this mini-toolbar should be mapped to: */564 VBoxGlobal::setFullScreenMonitorX11(m_pMiniToolBar, pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId));565 }566 562 } 567 563
Note:
See TracChangeset
for help on using the changeset viewer.