Changeset 98557 in vbox
- Timestamp:
- Feb 14, 2023 12:09:21 PM (22 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98556 r98557 474 474 { 475 475 return uisession()->setSeamlessMode(fEnabled); 476 } 477 478 bool UIMachine::viewportChanged(ulong uScreenId, ulong xOrigin, ulong yOrigin, ulong uWidth, ulong uHeight) 479 { 480 return uisession()->viewportChanged(uScreenId, xOrigin, yOrigin, uWidth, uHeight); 481 } 482 483 bool UIMachine::invalidateAndUpdate() 484 { 485 return uisession()->invalidateAndUpdate(); 486 } 487 488 bool UIMachine::invalidateAndUpdateScreen(ulong uScreenId) 489 { 490 return uisession()->invalidateAndUpdateScreen(uScreenId); 476 491 } 477 492 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98556 r98557 297 297 /** Defines whether seamless mode is enabled for display. */ 298 298 bool setSeamlessMode(bool fEnabled); 299 /** Notifies display about viewport changes. */ 300 bool viewportChanged(ulong uScreenId, ulong xOrigin, ulong yOrigin, ulong uWidth, ulong uHeight); 301 /** Notifies display about all screens were invalidated. */ 302 bool invalidateAndUpdate(); 303 /** Notifies display about screen with passed uScreenId was invalidated. */ 304 bool invalidateAndUpdateScreen(ulong uScreenId); 299 305 /** @} */ 300 306 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r98556 r98557 66 66 /* COM includes: */ 67 67 #include "CConsole.h" 68 #include "CDisplay.h"69 68 #include "CGraphicsAdapter.h" 70 69 #include "CSession.h" … … 371 370 void UIMachineView::updateViewport() 372 371 { 373 display().ViewportChanged(screenId(), contentsX(), contentsY(), visibleWidth(), visibleHeight());372 uimachine()->viewportChanged(screenId(), contentsX(), contentsY(), visibleWidth(), visibleHeight()); 374 373 } 375 374 … … 672 671 /* Ask for just required guest display update (it will also update 673 672 * the viewport through IFramebuffer::NotifyUpdate): */ 674 display().InvalidateAndUpdateScreen(m_uScreenId);673 uimachine()->invalidateAndUpdateScreen(m_uScreenId); 675 674 676 675 /* If we are in normal or scaled mode and if GA are active, … … 1085 1084 /* Ask for full guest display update (it will also update 1086 1085 * the viewport through IFramebuffer::NotifyUpdate): */ 1087 display().InvalidateAndUpdate();1086 uimachine()->invalidateAndUpdate(); 1088 1087 } 1089 1088 } … … 1402 1401 * Note: VBOX_WITH_CROGL additionally requires us to call DetachFramebuffer 1403 1402 * to ensure 3D gets notified of view being destroyed... */ 1404 if (console().isOk() && !display().isNull())1403 if (console().isOk()) 1405 1404 frameBuffer()->detach(); 1406 1405 … … 1429 1428 { 1430 1429 return uisession()->console(); 1431 }1432 1433 CDisplay& UIMachineView::display() const1434 {1435 return uisession()->display();1436 1430 } 1437 1431 … … 1604 1598 1605 1599 /* Dim screen-shot if it is Ok: */ 1606 if ( display().isOk() &&!screenShot.isNull())1600 if (!screenShot.isNull()) 1607 1601 dimImage(screenShot); 1608 1602 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r98517 r98557 67 67 class UISession; 68 68 class CConsole; 69 class CDisplay;70 69 class CGuest; 71 70 class CMachine; … … 278 277 /** Returns the session's console reference. */ 279 278 CConsole& console() const; 280 /** Returns the console's display reference. */281 CDisplay& display() const;282 279 283 280 /* Protected getters: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98556 r98557 510 510 CDisplay comDisplay = display(); 511 511 comDisplay.SetSeamlessMode(fEnabled); 512 const bool fSuccess = comDisplay.isOk(); 513 if (!fSuccess) 514 UINotificationMessage::cannotChangeDisplayParameter(comDisplay); 515 return fSuccess; 516 } 517 518 bool UISession::viewportChanged(ulong uScreenId, ulong xOrigin, ulong yOrigin, ulong uWidth, ulong uHeight) 519 { 520 CDisplay comDisplay = display(); 521 comDisplay.ViewportChanged(uScreenId, xOrigin, yOrigin, uWidth, uHeight); 522 const bool fSuccess = comDisplay.isOk(); 523 if (!fSuccess) 524 UINotificationMessage::cannotChangeDisplayParameter(comDisplay); 525 return fSuccess; 526 } 527 528 bool UISession::invalidateAndUpdate() 529 { 530 CDisplay comDisplay = display(); 531 comDisplay.InvalidateAndUpdate(); 532 const bool fSuccess = comDisplay.isOk(); 533 if (!fSuccess) 534 UINotificationMessage::cannotChangeDisplayParameter(comDisplay); 535 return fSuccess; 536 } 537 538 bool UISession::invalidateAndUpdateScreen(ulong uScreenId) 539 { 540 CDisplay comDisplay = display(); 541 comDisplay.InvalidateAndUpdateScreen(uScreenId); 512 542 const bool fSuccess = comDisplay.isOk(); 513 543 if (!fSuccess) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98556 r98557 315 315 /** Defines whether seamless mode is enabled for display. */ 316 316 bool setSeamlessMode(bool fEnabled); 317 /** Notifies display about viewport changes. */ 318 bool viewportChanged(ulong uScreenId, ulong xOrigin, ulong yOrigin, ulong uWidth, ulong uHeight); 319 /** Notifies display about all screens were invalidated. */ 320 bool invalidateAndUpdate(); 321 /** Notifies display about screen with passed uScreenId was invalidated. */ 322 bool invalidateAndUpdateScreen(ulong uScreenId); 317 323 /** @} */ 318 324
Note:
See TracChangeset
for help on using the changeset viewer.