Fixed incorrect mouse button swapping on client screens.
This commit is contained in:
parent
c148bc7c9c
commit
57ba0cb660
|
@ -637,6 +637,22 @@ static const UINT g_mapEF00[] =
|
||||||
DWORD
|
DWORD
|
||||||
CMSWindowsSecondaryScreen::mapButton(ButtonID button, bool press) const
|
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
|
// map button id to button flag
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case kButtonLeft:
|
case kButtonLeft:
|
||||||
|
|
|
@ -450,7 +450,7 @@ CXWindowsSecondaryScreen::mapButton(ButtonID id) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return static_cast<unsigned int>(id);
|
return static_cast<unsigned int>(m_buttons[id - 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue