Changeset 98400 in vbox for trunk/src/VBox
- Timestamp:
- Feb 1, 2023 2:50:42 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 9 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 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336 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 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336
-
- 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 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
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r98385 r98400 1453 1453 /* If HID LEDs sync is disabled or not supported, check if the guest has the 1454 1454 * same view on the modifier keys (NumLock, CapsLock, ScrollLock) as the host. */ 1455 if (! machineLogic()->isHidLedsSyncEnabled())1455 if (!uimachine()->isHidLedsSyncEnabled()) 1456 1456 if (fFlags & KeyPressed) 1457 1457 fixModifierState(pCodes, puCodesCount); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98399 r98400 698 698 , m_uNumLockAdaptionCnt(2) 699 699 , m_uCapsLockAdaptionCnt(2) 700 , m_fIsHidLedsSyncEnabled(false) 700 701 , m_iKeyboardState(0) 701 702 , m_fIsHidingHostPointer(true) … … 735 736 prepareScreens(); 736 737 prepareBranding(); 738 prepareKeyboard(); 737 739 prepareMachineLogic(); 738 740 … … 989 991 } 990 992 993 void UIMachine::prepareKeyboard() 994 { 995 #if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN) 996 /* Load extra-data value: */ 997 m_fIsHidLedsSyncEnabled = gEDataManager->hidLedsSyncState(uiCommon().managedVMUuid()); 998 /* Connect to extra-data changes to be able to enable/disable feature dynamically: */ 999 connect(gEDataManager, &UIExtraDataManager::sigHidLedsSyncStateChange, 1000 this, &UIMachine::sltHidLedsSyncStateChanged); 1001 #endif /* VBOX_WS_MAC || VBOX_WS_WIN */ 1002 } 1003 991 1004 void UIMachine::prepareMachineLogic() 992 1005 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98399 r98400 245 245 void setCapsLockAdaptionCnt(uint uCount) { m_uCapsLockAdaptionCnt = uCount; } 246 246 247 /** Returns whether VM should perform HID LEDs synchronization. */ 248 bool isHidLedsSyncEnabled() const { return m_fIsHidLedsSyncEnabled; } 249 247 250 /** Returns the keyboard-state. */ 248 251 int keyboardState() const { return m_iKeyboardState; } … … 371 374 * @param fScrollLock Brings SCROLL lock status. */ 372 375 void sltHandleKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 376 377 /** Handles signal about keyboard LEDs sync state change. 378 * @param fEnabled Brings sync status. */ 379 void sltHidLedsSyncStateChanged(bool fEnabled) { m_fIsHidLedsSyncEnabled = fEnabled; } 373 380 /** @} */ 374 381 … … 413 420 /** Prepare routine: Actions stuff. */ 414 421 void prepareActions(); 422 /** Prepare routine: Keyboard stuff. */ 423 void prepareKeyboard(); 415 424 /** Prepare routine: Machine-logic stuff. */ 416 425 void prepareMachineLogic(); … … 555 564 uint m_uCapsLockAdaptionCnt; 556 565 566 /** Holds whether VM should perform HID LEDs synchronization. */ 567 bool m_fIsHidLedsSyncEnabled; 568 557 569 /** Holds the keyboard-state. */ 558 570 int m_iKeyboardState; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98399 r98400 609 609 } 610 610 611 void UIMachineLogic::sltHidLedsSyncStateChanged(bool fEnabled)612 {613 m_fIsHidLedsSyncEnabled = fEnabled;614 }615 616 611 void UIMachineLogic::sltDisableHostScreenSaverStateChanged(bool fDisabled) 617 612 { … … 633 628 * [bool] uisession() -> isNumLock(), isCapsLock(), isScrollLock() can be used for that. */ 634 629 635 if (! isHidLedsSyncEnabled())630 if (!uimachine()->isHidLedsSyncEnabled()) 636 631 return; 637 632 … … 785 780 #endif /* VBOX_WS_MAC */ 786 781 , m_pHostLedsState(NULL) 787 , m_fIsHidLedsSyncEnabled(false)788 782 , m_pLogViewerDialog(0) 789 783 , m_pFileManagerDialog(0) … … 1381 1375 void UIMachineLogic::loadSettings() 1382 1376 { 1383 #if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN)1384 /* Read cached extra-data value: */1385 m_fIsHidLedsSyncEnabled = gEDataManager->hidLedsSyncState(uiCommon().managedVMUuid());1386 /* Subscribe to extra-data changes to be able to enable/disable feature dynamically: */1387 connect(gEDataManager, &UIExtraDataManager::sigHidLedsSyncStateChange, this, &UIMachineLogic::sltHidLedsSyncStateChanged);1388 #endif /* VBOX_WS_MAC || VBOX_WS_WIN */1389 1377 /* HID LEDs sync initialization: */ 1390 1378 sltSwitchKeyboardLedsToGuestLeds(); 1391 /* */ 1379 1392 1380 #if defined(VBOX_WS_X11) || defined(VBOX_WS_WIN) 1393 1381 connect(gEDataManager, &UIExtraDataManager::sigDisableHostScreenSaverStateChange, … … 1479 1467 * won't be called in sltSwitchKeyboardLedsToGuestLeds() and guest 1480 1468 * will loose keyboard input forever. */ 1481 if ( isHidLedsSyncEnabled())1469 if (uimachine()->isHidLedsSyncEnabled()) 1482 1470 { 1483 1471 keyboardHandler()->winSkipKeyboardEvents(true); … … 2676 2664 * [bool] uisession() -> isNumLock(), isCapsLock(), isScrollLock() can be used for that. */ 2677 2665 2678 if (! isHidLedsSyncEnabled())2666 if (!uimachine()->isHidLedsSyncEnabled()) 2679 2667 return; 2680 2668 … … 2703 2691 // machineName().toUtf8().constData()); 2704 2692 2705 if (! isHidLedsSyncEnabled())2693 if (!uimachine()->isHidLedsSyncEnabled()) 2706 2694 return; 2707 2695 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r98375 r98400 161 161 #endif /* VBOX_WS_MAC */ 162 162 163 /** Returns whether VM should perform HID LEDs synchronization. */164 bool isHidLedsSyncEnabled() const { return m_fIsHidLedsSyncEnabled; }165 163 /** An public interface to sltTypeHostKeyComboPressRelease. */ 166 164 void typeHostKeyComboPressRelease(bool fToggleSequence); … … 362 360 363 361 /* Handlers: Keyboard LEDs sync logic: */ 364 void sltHidLedsSyncStateChanged(bool fEnabled);365 362 void sltSwitchKeyboardLedsToGuestLeds(); 366 363 void sltSwitchKeyboardLedsToPreviousLeds(); … … 457 454 void *m_pHostLedsState; 458 455 459 /** Holds whether VM should perform HID LEDs synchronization. */460 bool m_fIsHidLedsSyncEnabled;461 462 456 /** Holds the map of settings dialogs. */ 463 457 QMap<UISettingsDialog::DialogType, UISettingsDialog*> m_settings; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98399 r98400 179 179 #if defined(VBOX_WS_MAC) || defined(VBOX_WS_WIN) 180 180 LogRel(("GUI: HID LEDs sync is %s\n", 181 uimachine()-> machineLogic()->isHidLedsSyncEnabled()181 uimachine()->isHidLedsSyncEnabled() 182 182 ? "enabled" : "disabled")); 183 183 #else /* !VBOX_WS_MAC && !VBOX_WS_WIN */
Note:
See TracChangeset
for help on using the changeset viewer.