- Timestamp:
- Jun 15, 2016 2:24:41 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 108089
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r61663 r61720 414 414 AssertPtrReturnVoid(pFullscreenLogic); 415 415 416 /* Make sure window should be shown and mapped to some host-screen: */ 416 #if defined(VBOX_WS_MAC) 417 418 /* If window shouldn't be shown or mapped to some host-screen: */ 417 419 if (!uisession()->isScreenVisible(m_uScreenId) || 418 420 !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId)) 419 421 { 420 /* Remember whether the window was minimized: */ 421 if (isMinimized()) 422 m_fWasMinimized = true; 423 /* Hide window and reset it's state to NONE: */ 424 setWindowState(Qt::WindowNoState); 422 /* Hide window: */ 425 423 hide(); 426 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 427 /* If there is mini-toolbar: */ 428 if (m_pMiniToolBar) 429 { 430 /* Hide mini-toolbar and reset it's state to NONE: */ 431 m_pMiniToolBar->setWindowState(Qt::WindowNoState); 432 m_pMiniToolBar->hide(); 433 } 434 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 435 } 424 } 425 /* If window should be shown and mapped to some host-screen: */ 436 426 else 437 427 { 438 /* Ignore if window is minimized and visible: */439 if (isMinimized() && isVisible())440 return;441 442 #ifdef VBOX_WS_X11443 /* If WM doesn't support native stuff, we need to call for placeOnScreen(): */444 const bool fSupportsNativeFullScreen = VBoxGlobal::supportsFullScreenMonitorsProtocolX11() &&445 !gEDataManager->legacyFullscreenModeRequested();446 if (!fSupportsNativeFullScreen)447 {448 /* Make sure window have appropriate geometry: */449 placeOnScreen();450 }451 #else /* !VBOX_WS_X11 */452 428 /* Make sure window have appropriate geometry: */ 453 429 placeOnScreen(); 454 #endif /* !VBOX_WS_X11 */ 455 456 #if defined(VBOX_WS_MAC) 430 457 431 /* ML and next using native stuff, so we can call for simple show(), 458 432 * Lion and previous using Qt stuff, so we should call for showFullScreen(): */ … … 468 442 showFullScreen(); 469 443 } 470 #elif defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 444 445 /* Adjust machine-view size if necessary: */ 446 adjustMachineViewSize(); 447 448 /* Make sure machine-view have focus: */ 449 m_pMachineView->setFocus(); 450 } 451 452 #elif defined(VBOX_WS_WIN) 453 454 /* If window shouldn't be shown or mapped to some host-screen: */ 455 if (!uisession()->isScreenVisible(m_uScreenId) || 456 !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId)) 457 { 458 /* Remember whether the window was minimized: */ 459 if (isMinimized()) 460 m_fWasMinimized = true; 461 462 /* Hide window and reset it's state to NONE: */ 463 setWindowState(Qt::WindowNoState); 464 hide(); 465 471 466 /* If there is mini-toolbar: */ 472 467 if (m_pMiniToolBar) 473 468 { 469 /* Hide mini-toolbar and reset it's state to NONE: */ 470 m_pMiniToolBar->setWindowState(Qt::WindowNoState); 471 m_pMiniToolBar->hide(); 472 } 473 } 474 /* If window should be shown and mapped to some host-screen: */ 475 else 476 { 477 /* Ignore if window is minimized and visible: */ 478 if (isMinimized() && isVisible()) 479 return; 480 481 /* Make sure window have appropriate geometry: */ 482 placeOnScreen(); 483 484 /* If there is mini-toolbar: */ 485 if (m_pMiniToolBar) 486 { 474 487 /* Show mini-toolbar: */ 475 488 m_pMiniToolBar->showFullScreen(); 476 489 } 490 477 491 /* Show window: */ 478 492 showFullScreen(); 493 479 494 /* Restore minimized state if necessary: */ 480 495 if (m_fWasMinimized) … … 483 498 showMinimized(); 484 499 } 485 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 486 487 #ifdef VBOX_WS_X11 500 501 /* Adjust machine-view size if necessary: */ 502 adjustMachineViewSize(); 503 504 /* Make sure machine-view have focus: */ 505 m_pMachineView->setFocus(); 506 } 507 508 #elif defined(VBOX_WS_X11) 509 510 /* If window shouldn't be shown or mapped to some host-screen: */ 511 if (!uisession()->isScreenVisible(m_uScreenId) || 512 !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId)) 513 { 514 /* Remember whether the window was minimized: */ 515 if (isMinimized()) 516 m_fWasMinimized = true; 517 518 /* Hide window and reset it's state to NONE: */ 519 setWindowState(Qt::WindowNoState); 520 hide(); 521 522 /* If there is mini-toolbar: */ 523 if (m_pMiniToolBar) 524 { 525 /* Hide mini-toolbar and reset it's state to NONE: */ 526 m_pMiniToolBar->setWindowState(Qt::WindowNoState); 527 m_pMiniToolBar->hide(); 528 } 529 } 530 /* If window should be shown and mapped to some host-screen: */ 531 else 532 { 533 /* Ignore if window is minimized and visible: */ 534 if (isMinimized() && isVisible()) 535 return; 536 537 /* If WM doesn't support native stuff, we need to call for placeOnScreen(): */ 538 const bool fUseNativeFullScreen = VBoxGlobal::supportsFullScreenMonitorsProtocolX11() && 539 !gEDataManager->legacyFullscreenModeRequested(); 540 if (!fUseNativeFullScreen) 541 { 542 /* Make sure window have appropriate geometry: */ 543 placeOnScreen(); 544 } 545 546 /* Show window: */ 547 showFullScreen(); 548 549 /* If there is mini-toolbar: */ 550 if (m_pMiniToolBar) 551 { 552 /* Show mini-toolbar: */ 553 m_pMiniToolBar->showFullScreen(); 554 } 555 556 /* Restore minimized state if necessary: */ 557 if (m_fWasMinimized) 558 { 559 m_fWasMinimized = false; 560 showMinimized(); 561 } 562 488 563 /* If WM supports native stuff, we need to map window to corresponding host-screen. */ 489 if (f SupportsNativeFullScreen)564 if (fUseNativeFullScreen) 490 565 { 491 566 /* Tell recent window managers which host-screen this window should be mapped to: */ … … 499 574 } 500 575 } 501 #endif /* VBOX_WS_X11 */502 576 503 577 /* Adjust machine-view size if necessary: */ … … 507 581 m_pMachineView->setFocus(); 508 582 } 583 584 #else 585 586 # warning "port me" 587 588 #endif 509 589 } 510 590
Note:
See TracChangeset
for help on using the changeset viewer.