mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
Now restoring toggle key states on leaving a client screen to
their state when the screen was entered. Previously when leaving a client screen the toggle keys kept their state so, say, caps lock, would remain on. This was inconvenient if you then used the client's keyboard directly.
This commit is contained in:
@@ -405,6 +405,22 @@ CXWindowsSecondaryScreen::setToggleState(KeyModifierMask mask)
|
||||
}
|
||||
}
|
||||
|
||||
KeyModifierMask
|
||||
CXWindowsSecondaryScreen::getToggleState() const
|
||||
{
|
||||
KeyModifierMask mask = 0;
|
||||
if ((m_mask & m_capsLockMask) != 0) {
|
||||
mask |= KeyModifierCapsLock;
|
||||
}
|
||||
if ((m_mask & m_numLockMask) != 0) {
|
||||
mask |= KeyModifierNumLock;
|
||||
}
|
||||
if ((m_mask & m_scrollLockMask) != 0) {
|
||||
mask |= KeyModifierScrollLock;
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
CXWindowsSecondaryScreen::mapButton(ButtonID id) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user