Changeset 98425 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 2, 2023 9:55:00 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3:79645-79692 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527,155559,155572 22 22 /trunk/src:92342,154921
-
- Property svn:mergeinfo
-
trunk/src/VBox
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3/src/VBox:79645-79692 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527,155559,155572
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends
- Property svn:mergeinfo
-
old new 16 16 /branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 17 17 /branches/dsen/gui3/src/VBox/Frontends:79645-79692 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527,155559,155572
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r98400 r98425 1951 1951 bool UIKeyboardHandler::isAutoCaptureDisabled() 1952 1952 { 1953 return ui session()->isAutoCaptureDisabled();1953 return uimachine()->isAutoCaptureDisabled(); 1954 1954 } 1955 1955 1956 1956 void UIKeyboardHandler::setAutoCaptureDisabled(bool fIsAutoCaptureDisabled) 1957 1957 { 1958 ui session()->setAutoCaptureDisabled(fIsAutoCaptureDisabled);1958 uimachine()->setAutoCaptureDisabled(fIsAutoCaptureDisabled); 1959 1959 } 1960 1960 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98424 r98425 818 818 , m_pWatchdogDisplayChange(0) 819 819 #endif 820 , m_fIsGuestResizeIgnored(false) 820 821 , m_fNumLock(false) 821 822 , m_fCapsLock(false) … … 824 825 , m_uCapsLockAdaptionCnt(2) 825 826 , m_fIsHidLedsSyncEnabled(false) 827 , m_fIsAutoCaptureDisabled(false) 826 828 , m_iKeyboardState(0) 827 829 , m_fIsHidingHostPointer(true) … … 858 860 return false; 859 861 AssertPtrReturn(uisession(), false); 860 861 /* Cache media data early if necessary: */862 if (uiCommon().agressiveCaching())863 uiCommon().enumerateMedia(uisession()->machineMedia());864 862 865 863 /* Prepare stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98424 r98425 122 122 /** @} */ 123 123 124 /** @name Mouse cursorstuff.124 /** @name Mouse stuff. 125 125 ** @{ */ 126 126 /** Notifies listeners about mouse pointer shape change. */ … … 236 236 /** Defines last full-screen @a size for guest-screen with index @a uScreenId. */ 237 237 void setLastFullScreenSize(ulong uScreenId, QSize size); 238 239 /** Returns whether guest screen resize should be ignored. */ 240 bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; } 241 /** Defines whether guest screen resize should be @a fIgnored. */ 242 void setGuestResizeIgnored(bool fIgnored) { m_fIsGuestResizeIgnored = fIgnored; } 238 243 /** @} */ 239 244 … … 260 265 bool isHidLedsSyncEnabled() const { return m_fIsHidLedsSyncEnabled; } 261 266 267 /** Returns whether auto-capture is disabled. */ 268 bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; } 269 /** Defines whether auto-capture is @a fDisabled. */ 270 void setAutoCaptureDisabled(bool fDisabled) { m_fIsAutoCaptureDisabled = fDisabled; } 271 262 272 /** Returns the keyboard-state. */ 263 273 int keyboardState() const { return m_iKeyboardState; } 264 274 /** @} */ 265 275 266 /** @name Mouse cursorstuff.276 /** @name Mouse stuff. 267 277 ** @{ */ 268 278 /** Returns whether we should hide host mouse pointer. */ … … 354 364 /** @} */ 355 365 356 /** @name Mouse cursorstuff.366 /** @name Mouse stuff. 357 367 ** @{ */ 358 368 /** Defines @a iMouseState. */ … … 433 443 /** @} */ 434 444 435 /** @name Mouse cursorstuff.445 /** @name Mouse stuff. 436 446 ** @{ */ 437 447 /** Handles signal about mouse pointer shape data change. … … 527 537 /** @} */ 528 538 529 /** @name Mouse cursorstuff.539 /** @name Mouse stuff. 530 540 ** @{ */ 531 541 /** Updates mouse pointer shape. */ … … 626 636 /** Holds the list of guest-screen full-screen sizes. */ 627 637 QVector<QSize> m_monitorLastFullScreenSizeVector; 638 639 /** Holds whether guest screen resize should be ignored. */ 640 bool m_fIsGuestResizeIgnored; 628 641 /** @} */ 629 642 … … 645 658 bool m_fIsHidLedsSyncEnabled; 646 659 660 /** Holds whether auto-capture is disabled. */ 661 bool m_fIsAutoCaptureDisabled; 662 647 663 /** Holds the keyboard-state. */ 648 664 int m_iKeyboardState; 649 665 /** @} */ 650 666 651 /** @name Mouse cursorstuff.667 /** @name Mouse stuff. 652 668 ** @{ */ 653 669 /** Holds whether we should hide host mouse pointer. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98423 r98425 459 459 { 460 460 /* Prevent machine-view from resizing: */ 461 ui session()->setGuestResizeIgnored(true);461 uimachine()->setGuestResizeIgnored(true); 462 462 /* Get log-folder: */ 463 463 QString strLogFolder = machine().GetLogFolder(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r98386 r98425 599 599 /* Some situations require frame-buffer resize-events to be ignored at all, 600 600 * leaving machine-window, machine-view and frame-buffer sizes preserved: */ 601 if (ui session()->isGuestResizeIgnored())601 if (uimachine()->isGuestResizeIgnored()) 602 602 return; 603 603 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r98385 r98425 1170 1170 /* Temporarily disable auto capture that will take place after this dialog is dismissed because 1171 1171 * the capture state is to be defined by the dialog result itself: */ 1172 ui session()->setAutoCaptureDisabled(true);1172 uimachine()->setAutoCaptureDisabled(true); 1173 1173 bool fIsAutoConfirmed = false; 1174 1174 bool ok = msgCenter().confirmInputCapture(fIsAutoConfirmed); 1175 1175 if (fIsAutoConfirmed) 1176 ui session()->setAutoCaptureDisabled(false);1176 uimachine()->setAutoCaptureDisabled(false); 1177 1177 /* Otherwise, the disable flag will be reset in the next console view's focus in event (since 1178 1178 * may happen asynchronously on some platforms, after we return from this code): */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98424 r98425 368 368 , m_machineStatePrevious(KMachineState_Null) 369 369 , m_machineState(KMachineState_Null) 370 /* Common flags: */371 , m_fIsGuestResizeIgnored(false)372 , m_fIsAutoCaptureDisabled(false)373 370 /* Guest additions flags: */ 374 371 , m_ulGuestAdditionsRunLevel(0) … … 402 399 if (!prepareSession()) 403 400 return false; 401 402 /* Cache media early if requested: */ 403 if (uiCommon().agressiveCaching()) 404 recacheMachineMedia(); 404 405 405 406 /* Prepare GUI stuff: */ … … 802 803 } 803 804 804 CMediumVector UISession::machineMedia() const 805 { 805 void UISession::recacheMachineMedia() 806 { 807 /* Compose a list of machine media: */ 806 808 CMediumVector comMedia; 809 807 810 /* Enumerate all the controllers: */ 808 foreach (const CStorageController &comController, m _machine.GetStorageControllers())811 foreach (const CStorageController &comController, machine().GetStorageControllers()) 809 812 { 810 813 /* Enumerate all the attachments: */ 811 foreach (const CMediumAttachment &comAttachment, m _machine.GetMediumAttachmentsOfController(comController.GetName()))814 foreach (const CMediumAttachment &comAttachment, machine().GetMediumAttachmentsOfController(comController.GetName())) 812 815 { 813 816 /* Skip unrelated device types: */ … … 823 826 } 824 827 } 825 return comMedia; 828 829 /* Start media enumeration: */ 830 uiCommon().enumerateMedia(comMedia); 826 831 } 827 832 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98424 r98425 53 53 #include "CKeyboard.h" 54 54 #include "CMachineDebugger.h" 55 #include "CMedium.h"56 55 57 56 /* Forward declarations: */ … … 166 165 QString machineName() const { return m_strMachineName; } 167 166 167 /** Returns main machine-widget id. */ 168 WId mainMachineWindowId() const; 169 168 170 /** Returns previous machine state. */ 169 171 KMachineState machineStatePrevious() const { return m_machineStatePrevious; } 170 172 /** Returns machine state. */ 171 173 KMachineState machineState() const { return m_machineState; } 172 173 /** Returns main machine-widget id. */174 WId mainMachineWindowId() const;175 174 176 175 bool isSaved() const { return machineState() == KMachineState_Saved || … … 189 188 bool wasPaused() const { return machineStatePrevious() == KMachineState_Paused || 190 189 machineStatePrevious() == KMachineState_TeleportingPausedVM; } 191 192 bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; } 193 bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; } 190 /** Returns whether guest-screen is undrawable. 191 * @todo: extend this method to all the states when guest-screen is undrawable. */ 192 bool isGuestScreenUnDrawable() const { return machineState() == KMachineState_Stopping || 193 machineState() == KMachineState_Saving; } 194 194 195 195 196 /* Guest additions state getters: */ … … 206 207 bool unpause() { return setPause(false); } 207 208 bool setPause(bool fOn); 208 void setGuestResizeIgnored(bool fIsGuestResizeIgnored) { m_fIsGuestResizeIgnored = fIsGuestResizeIgnored; }209 void setAutoCaptureDisabled(bool fIsAutoCaptureDisabled) { m_fIsAutoCaptureDisabled = fIsAutoCaptureDisabled; }210 209 void forgetPreviousMachineState() { m_machineStatePrevious = m_machineState; } 211 212 /** Returns whether guest-screen is undrawable.213 * @todo: extend this method to all the states when guest-screen is undrawable. */214 bool isGuestScreenUnDrawable() const { return machineState() == KMachineState_Stopping ||215 machineState() == KMachineState_Saving; }216 210 217 211 /* Returns existing framebuffer for the given screen-number; … … 224 218 const QVector<UIFrameBuffer*>& frameBuffers() const { return m_frameBufferVector; } 225 219 226 /** Returns a vector of media attached to the machine. */227 CMediumVector machineMedia() const;228 229 220 /** Prepares VM to be saved. */ 230 221 bool prepareToBeSaved(); … … 284 275 bool preprocessInitialization(); 285 276 bool mountAdHocImage(KDeviceType enmDeviceType, UIMediumDeviceType enmMediumType, const QString &strMediumName); 277 278 /** Recaches media attached to the machine. */ 279 void recacheMachineMedia(); 286 280 287 281 /* Private variables: */ … … 318 312 QVector<UIFrameBuffer*> m_frameBufferVector; 319 313 320 /* Common flags: */321 bool m_fIsGuestResizeIgnored : 1;322 bool m_fIsAutoCaptureDisabled : 1;323 324 314 /* Guest additions flags: */ 325 315 ULONG m_ulGuestAdditionsRunLevel;
Note:
See TracChangeset
for help on using the changeset viewer.