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
// we'll get notifications of children created after the XQueryTree()
// so we won't miss them.
XSelectInput(m_display, w, PointerMotionMask | SubstructureNotifyMask);
XSelectInput(m_display, w, KeyPressMask | KeyReleaseMask |
PointerMotionMask | SubstructureNotifyMask);
// recurse on child windows
Window rw, pw, *cw;

View File

@ -272,8 +272,11 @@ CServer::getDisconnectedEvent()
}
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;
}
@ -291,17 +294,19 @@ UInt32
CServer::getActivePrimarySides() const
{
UInt32 sides = 0;
if (getNeighbor(m_primaryClient, kLeft) != NULL) {
sides |= kLeftMask;
}
if (getNeighbor(m_primaryClient, kRight) != NULL) {
sides |= kRightMask;
}
if (getNeighbor(m_primaryClient, kTop) != NULL) {
sides |= kTopMask;
}
if (getNeighbor(m_primaryClient, kBottom) != NULL) {
sides |= kBottomMask;
if (!isLockedToScreen()) {
if (getNeighbor(m_primaryClient, kLeft) != NULL) {
sides |= kLeftMask;
}
if (getNeighbor(m_primaryClient, kRight) != NULL) {
sides |= kRightMask;
}
if (getNeighbor(m_primaryClient, kTop) != NULL) {
sides |= kTopMask;
}
if (getNeighbor(m_primaryClient, kBottom) != NULL) {
sides |= kBottomMask;
}
}
return sides;
}
@ -1148,6 +1153,7 @@ void
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_INFO "onKeyDown: id=%d mask=0x%04x button=0x%04x", id, mask, button));
assert(m_active != NULL);
// handle command keys
@ -1163,6 +1169,7 @@ void
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_INFO "onKeyUp id=%d mask=0x%04x button=0x%04x", id, mask, button));
assert(m_active != NULL);
// handle command keys
@ -1179,6 +1186,7 @@ CServer::onKeyRepeat(KeyID id, KeyModifierMask mask,
SInt32 count, KeyButton 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);
// handle command keys