Changeset 98452 in vbox for trunk/src/VBox
- Timestamp:
- Feb 2, 2023 5:10:37 PM (23 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98451 r98452 403 403 visibleWindows.push_back(i); 404 404 return visibleWindows; 405 } 406 407 QSize UIMachine::guestScreenSize(ulong uScreenId) const 408 { 409 return uisession()->frameBufferSize(uScreenId); 405 410 } 406 411 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98450 r98452 261 261 QList<int> listOfVisibleWindows() const; 262 262 263 /** Returns size for guest-screen with index @a uScreenId. */ 264 QSize guestScreenSize(ulong uScreenId) const; 265 263 266 /** Returns last full-screen size for guest-screen with index @a uScreenId. */ 264 267 QSize lastFullScreenSize(ulong uScreenId) const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r98451 r98452 35 35 #include "UIActionPoolRuntime.h" 36 36 #include "UIMachineLogic.h" 37 #include "UIFrameBuffer.h"38 #include "UISession.h"39 37 #include "UIMachine.h" 40 38 #include "UIMessageCenter.h" … … 161 159 ULONG uHeight = 600; 162 160 /* Try to get previous guest-screen arguments: */ 163 int iGuestScreen = m_disabledGuestScreens[iGuestScreenIndex];164 if (UIFrameBuffer *pFrameBuffer = m_pMachineLogic->uisession()->frameBuffer(iGuestScreen))161 const int iGuestScreen = m_disabledGuestScreens.at(iGuestScreenIndex); 162 const QSize guestScreenSize = m_pMachineLogic->uimachine()->guestScreenSize(iGuestScreen); 165 163 { 166 if ( pFrameBuffer->width() > 0)167 uWidth = pFrameBuffer->width();168 if ( pFrameBuffer->height() > 0)169 uHeight = pFrameBuffer->height();164 if (guestScreenSize.width() > 0) 165 uWidth = guestScreenSize.width(); 166 if (guestScreenSize.height() > 0) 167 uHeight = guestScreenSize.height(); 170 168 } 171 169 /* Re-enable guest-screen with proper resolution: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98432 r98452 299 299 if (uScreenId < (ulong)m_frameBufferVector.size()) 300 300 m_frameBufferVector[(int)uScreenId] = pFrameBuffer; 301 } 302 303 QSize UISession::frameBufferSize(ulong uScreenId) const 304 { 305 UIFrameBuffer *pFramebuffer = frameBuffer(uScreenId); 306 return pFramebuffer ? QSize(pFramebuffer->width(), pFramebuffer->height()) : QSize(); 301 307 } 302 308 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98427 r98452 256 256 /** Returns existing frame-buffer vector. */ 257 257 const QVector<UIFrameBuffer*> &frameBuffers() const { return m_frameBufferVector; } 258 /** Returns frame-buffer size for screen with index @a uScreenId. */ 259 QSize frameBufferSize(ulong uScreenId) const; 258 260 /** @} */ 259 261 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r98451 r98452 40 40 #include "UIMessageCenter.h" 41 41 #include "UIMultiScreenLayout.h" 42 #include "UISession.h"43 42 #include "UIShortcutPool.h" 44 43 #ifdef VBOX_WS_MAC 45 44 # include "UICocoaApplication.h" 46 45 # include "UIExtraDataManager.h" 47 # include "UIFrameBuffer.h"48 46 # include "VBoxUtils.h" 49 47 # include <Carbon/Carbon.h> … … 777 775 const int iWantedHostScreenIndex = hostScreenForGuestScreen((int)uScreenID); 778 776 const int iCurrentHostScreenIndex = UIDesktopWidgetWatchdog::screenNumber(pMachineWindow); 779 const UIFrameBuffer *pFrameBuffer = uisession()->frameBuffer(uScreenID); 780 const QSize frameBufferSize(pFrameBuffer->width(), pFrameBuffer->height()); 781 const QSize screenSize = gpDesktop->screenGeometry(iWantedHostScreenIndex).size(); 777 const QSize guestScreenSize = uimachine()->guestScreenSize(uScreenID); 778 const QSize hostScreenSize = gpDesktop->screenGeometry(iWantedHostScreenIndex).size(); 782 779 783 780 /* If that window … … 801 798 802 799 /* If that window 803 * 1. have another frame-buffersize than actually should. */804 else if ( frameBufferSize != screenSize)800 * 1. have another size than actually should. */ 801 else if (guestScreenSize != hostScreenSize) 805 802 { 806 803 LogRel(("GUI: UIMachineLogicFullscreen::revalidateNativeFullScreen: " -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r98386 r98452 43 43 #include "UIMachineWindowFullscreen.h" 44 44 #include "UINotificationCenter.h" 45 #include "UISession.h"46 45 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 47 46 # include "UIMachineDefs.h" 48 47 # include "UIMiniToolBar.h" 49 48 #elif defined(VBOX_WS_MAC) 50 # include "UIFrameBuffer.h"51 49 # include "VBoxUtils-darwin.h" 52 50 # include "UICocoaApplication.h" … … 384 382 if (geo.isNull()) 385 383 { 386 const UIFrameBuffer *pFrameBuffer = uisession()->frameBuffer(m_uScreenId);387 geo = QRect(QPoint(0, 0), QSize(pFrameBuffer->width(), pFrameBuffer->height()).boundedTo(workingArea.size()));384 const QSize guestScreenSize = uimachine()->guestScreenSize(m_uScreenId); 385 geo = QRect(QPoint(0, 0), guestScreenSize.boundedTo(workingArea.size())); 388 386 } 389 387 /* If normal geometry still null => use default size: */
Note:
See TracChangeset
for help on using the changeset viewer.