Fixed incorrect mouse button swapping on client screens.

This commit is contained in:
crs 2003-02-12 20:59:25 +00:00
parent c148bc7c9c
commit 57ba0cb660
2 changed files with 17 additions and 1 deletions

View File

@ -637,6 +637,22 @@ static const UINT g_mapEF00[] =
DWORD
CMSWindowsSecondaryScreen::mapButton(ButtonID button, bool press) const
{
// the system will swap the meaning of left/right for us if
// the user has configured a left-handed mouse but we don't
// want it to swap since we want the handedness of the
// server's mouse. so pre-swap for a left-handed mouse.
if (GetSystemMetrics(SM_SWAPBUTTON)) {
switch (button) {
case kButtonLeft:
button = kButtonRight;
break;
case kButtonRight:
button = kButtonLeft;
break;
}
}
// map button id to button flag
switch (button) {
case kButtonLeft:

View File

@ -450,7 +450,7 @@ CXWindowsSecondaryScreen::mapButton(ButtonID id) const
return 0;
}
else {
return static_cast<unsigned int>(id);
return static_cast<unsigned int>(m_buttons[id - 1]);
}
}