Added support for per-screen options in the configuration file

and sending those options to the appropriate client screens.
Currently, two options are supported:  halfDuplexCapsLock and
halfDuplexNumLock mark the caps lock and num lock keys,
respectively, as being half-duplex.
This commit is contained in:
crs
2002-12-23 13:55:21 +00:00
parent 72578b8061
commit 3fc1ddf6ce
29 changed files with 557 additions and 19 deletions

View File

@@ -203,6 +203,28 @@ CXWindowsSecondaryScreen::mouseWheel(SInt32 delta)
XSync(display, False);
}
void
CXWindowsSecondaryScreen::resetOptions()
{
m_numLockHalfDuplex = false;
m_capsLockHalfDuplex = false;
}
void
CXWindowsSecondaryScreen::setOptions(const COptionsList& options)
{
for (UInt32 i = 0, n = options.size(); i < n; i += 2) {
if (options[i] == kOptionHalfDuplexCapsLock) {
m_capsLockHalfDuplex = (options[i + 1] != 0);
LOG((CLOG_DEBUG1 "half-duplex caps-lock %s", m_capsLockHalfDuplex ? "on" : "off"));
}
else if (options[i] == kOptionHalfDuplexNumLock) {
m_numLockHalfDuplex = (options[i + 1] != 0);
LOG((CLOG_DEBUG1 "half-duplex num-lock %s", m_numLockHalfDuplex ? "on" : "off"));
}
}
}
IScreen*
CXWindowsSecondaryScreen::getScreen() const
{
@@ -262,12 +284,7 @@ CXWindowsSecondaryScreen::onPreOpen()
void
CXWindowsSecondaryScreen::onPostOpen()
{
// check for peculiarities
// FIXME -- may have to get these from some database
m_numLockHalfDuplex = false;
m_capsLockHalfDuplex = false;
// m_numLockHalfDuplex = true;
// m_capsLockHalfDuplex = true;
assert(m_window != None);
}
void