Server now disables jump zones when scroll lock is active.

This commit is contained in:
crs 2004-03-06 16:20:08 +00:00
parent 5593573182
commit a27c6ad2c6
2 changed files with 22 additions and 13 deletions

View File

@ -1344,7 +1344,8 @@ CXWindowsScreen::doSelectEvents(Window w) const
// select events of interest. do this before querying the tree so // select events of interest. do this before querying the tree so
// we'll get notifications of children created after the XQueryTree() // we'll get notifications of children created after the XQueryTree()
// so we won't miss them. // so we won't miss them.
XSelectInput(m_display, w, PointerMotionMask | SubstructureNotifyMask); XSelectInput(m_display, w, KeyPressMask | KeyReleaseMask |
PointerMotionMask | SubstructureNotifyMask);
// recurse on child windows // recurse on child windows
Window rw, pw, *cw; Window rw, pw, *cw;

View File

@ -272,8 +272,11 @@ CServer::getDisconnectedEvent()
} }
bool bool
CServer::onCommandKey(KeyID /*id*/, KeyModifierMask /*mask*/, bool /*down*/) CServer::onCommandKey(KeyID id, KeyModifierMask /*mask*/, bool /*down*/)
{ {
if (id == kKeyScrollLock) {
m_primaryClient->reconfigure(getActivePrimarySides());
}
return false; return false;
} }
@ -291,6 +294,7 @@ UInt32
CServer::getActivePrimarySides() const CServer::getActivePrimarySides() const
{ {
UInt32 sides = 0; UInt32 sides = 0;
if (!isLockedToScreen()) {
if (getNeighbor(m_primaryClient, kLeft) != NULL) { if (getNeighbor(m_primaryClient, kLeft) != NULL) {
sides |= kLeftMask; sides |= kLeftMask;
} }
@ -303,6 +307,7 @@ CServer::getActivePrimarySides() const
if (getNeighbor(m_primaryClient, kBottom) != NULL) { if (getNeighbor(m_primaryClient, kBottom) != NULL) {
sides |= kBottomMask; sides |= kBottomMask;
} }
}
return sides; return sides;
} }
@ -1148,6 +1153,7 @@ void
CServer::onKeyDown(KeyID id, KeyModifierMask mask, KeyButton button) CServer::onKeyDown(KeyID id, KeyModifierMask mask, KeyButton button)
{ {
LOG((CLOG_DEBUG1 "onKeyDown id=%d mask=0x%04x button=0x%04x", id, mask, button)); LOG((CLOG_DEBUG1 "onKeyDown id=%d mask=0x%04x button=0x%04x", id, mask, button));
LOG((CLOG_INFO "onKeyDown: id=%d mask=0x%04x button=0x%04x", id, mask, button));
assert(m_active != NULL); assert(m_active != NULL);
// handle command keys // handle command keys
@ -1163,6 +1169,7 @@ void
CServer::onKeyUp(KeyID id, KeyModifierMask mask, KeyButton button) CServer::onKeyUp(KeyID id, KeyModifierMask mask, KeyButton button)
{ {
LOG((CLOG_DEBUG1 "onKeyUp id=%d mask=0x%04x button=0x%04x", id, mask, button)); LOG((CLOG_DEBUG1 "onKeyUp id=%d mask=0x%04x button=0x%04x", id, mask, button));
LOG((CLOG_INFO "onKeyUp id=%d mask=0x%04x button=0x%04x", id, mask, button));
assert(m_active != NULL); assert(m_active != NULL);
// handle command keys // handle command keys
@ -1179,6 +1186,7 @@ CServer::onKeyRepeat(KeyID id, KeyModifierMask mask,
SInt32 count, KeyButton button) SInt32 count, KeyButton button)
{ {
LOG((CLOG_DEBUG1 "onKeyRepeat id=%d mask=0x%04x count=%d button=0x%04x", id, mask, count, button)); LOG((CLOG_DEBUG1 "onKeyRepeat id=%d mask=0x%04x count=%d button=0x%04x", id, mask, count, button));
LOG((CLOG_INFO "onKeyRepeat id=%d mask=0x%04x count=%d button=0x%04x", id, mask, count, button));
assert(m_active != NULL); assert(m_active != NULL);
// handle command keys // handle command keys