Converted win32 to new keyboard state tracking design. Also

changed locking to screen so that keys no longer count (only
mouse buttons and scroll lock toggled on).  This is to deal
with the unreliability of key event reporting which can leave
us locked to a screen with no key physically pressed.  The
result of this is that clients get key repeats and releases
without the corresponding key press.  CKeyState handles this
by discarding repeat/release events on keys it hasn't seen go
down.  Also made a few other minor fixes to win32 keyboard
handling.
This commit is contained in:
crs
2004-03-26 20:59:26 +00:00
parent ab11ebea01
commit e2a31e8b66
26 changed files with 1974 additions and 1761 deletions

View File

@@ -294,7 +294,7 @@ UInt32
CServer::getActivePrimarySides() const
{
UInt32 sides = 0;
if (!isLockedToScreen()) {
if (!isLockedToScreenServer()) {
if (getNeighbor(m_primaryClient, kLeft) != NULL) {
sides |= kLeftMask;
}
@@ -312,7 +312,7 @@ CServer::getActivePrimarySides() const
}
bool
CServer::isLockedToScreen() const
CServer::isLockedToScreenServer() const
{
// locked if scroll-lock is toggled on
if ((m_primaryClient->getToggleMask() & KeyModifierScrollLock) != 0) {
@@ -320,6 +320,18 @@ CServer::isLockedToScreen() const
return true;
}
// not locked
return false;
}
bool
CServer::isLockedToScreen() const
{
// locked if we say we're locked
if (isLockedToScreenServer()) {
return true;
}
// locked if primary says we're locked
if (m_primaryClient->isLockedToScreen()) {
return true;