mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +00:00
[client/idd] input: synchronize keyboard LEDs
Report guest HID keyboard LED state from LGInput to LGIdd and publish it with the LGMP input endpoint status. Forward SPICE modifier updates through the same provider state so evdev can synchronize physical keyboard LEDs across transport changes and reconnects. Bump the versioned pipe and KVMFR input status contracts for the new feedback state. Accept earlier LGMP input status versions without LED feedback so the client retains input while the guest driver is being upgraded.
This commit is contained in:
@@ -66,6 +66,10 @@ private:
|
||||
size_t m_queueHead = 0;
|
||||
size_t m_queueCount = 0;
|
||||
uint64_t m_sequence = 0;
|
||||
uint64_t m_feedbackSequence = 0;
|
||||
|
||||
std::atomic<uint8_t> m_keyboardLEDs { 0 };
|
||||
std::atomic<bool> m_keyboardLEDsValid { false };
|
||||
|
||||
MouseMode m_mouseMode = MouseMode::NONE;
|
||||
uint16_t m_absoluteX = 0;
|
||||
@@ -118,6 +122,14 @@ public:
|
||||
return Atomic::Load(m_state, std::memory_order_acquire);
|
||||
}
|
||||
|
||||
bool GetKeyboardLEDs(uint8_t& leds) const override
|
||||
{
|
||||
if (!Atomic::Load(m_keyboardLEDsValid, std::memory_order_acquire))
|
||||
return false;
|
||||
leds = Atomic::Load(m_keyboardLEDs, std::memory_order_acquire);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SendMouseRelative(
|
||||
_In_ int32_t deltaX,
|
||||
_In_ int32_t deltaY,
|
||||
|
||||
Reference in New Issue
Block a user