fix: Send extra mouse buttons on mac os servers to clients
This commit is contained in:
parent
4200de66ee
commit
84e1e722c0
1 changed files with 47 additions and 44 deletions
|
|
@ -1185,9 +1185,13 @@ ButtonID OSXScreen::mapDeskflowButtonToMac(uint16_t button) const
|
|||
return kMacButtonMiddle;
|
||||
case 3:
|
||||
return kMacButtonRight;
|
||||
case 4:
|
||||
return kButtonExtra0;
|
||||
case 5:
|
||||
return kButtonExtra1;
|
||||
default:
|
||||
return kButtonNone;
|
||||
}
|
||||
|
||||
return static_cast<ButtonID>(button);
|
||||
}
|
||||
|
||||
ButtonID OSXScreen::mapMacButtonToDeskflow(uint16_t macButton) const
|
||||
|
|
@ -1195,15 +1199,17 @@ ButtonID OSXScreen::mapMacButtonToDeskflow(uint16_t macButton) const
|
|||
switch (macButton) {
|
||||
case 1:
|
||||
return kButtonLeft;
|
||||
|
||||
case 2:
|
||||
return kButtonRight;
|
||||
|
||||
case 3:
|
||||
return kButtonMiddle;
|
||||
case 4:
|
||||
return kButtonExtra0;
|
||||
case 5:
|
||||
return kButtonExtra1;
|
||||
default:
|
||||
return kButtonNone;
|
||||
}
|
||||
|
||||
return static_cast<ButtonID>(macButton);
|
||||
}
|
||||
|
||||
int32_t OSXScreen::mapScrollWheelToDeskflow(int32_t x) const
|
||||
|
|
@ -1519,8 +1525,7 @@ static CGSSetGlobalHotKeyOperatingMode_t s_CGSSetGlobalHotKeyOperatingMode;
|
|||
s_##name_ = (name_##_t)NSAddressOfSymbol(NSLookupAndBindSymbolWithHint("_" #name_, "CoreGraphics")); \
|
||||
}
|
||||
|
||||
bool
|
||||
OSXScreen::isGlobalHotKeyOperatingModeAvailable()
|
||||
bool OSXScreen::isGlobalHotKeyOperatingModeAvailable()
|
||||
{
|
||||
if (!s_testedForGHOM) {
|
||||
s_testedForGHOM = true;
|
||||
|
|
@ -1534,8 +1539,7 @@ OSXScreen::isGlobalHotKeyOperatingModeAvailable()
|
|||
return s_hasGHOM;
|
||||
}
|
||||
|
||||
void
|
||||
OSXScreen::setGlobalHotKeysEnabled(bool enabled)
|
||||
void OSXScreen::setGlobalHotKeysEnabled(bool enabled)
|
||||
{
|
||||
if (isGlobalHotKeyOperatingModeAvailable()) {
|
||||
CGSConnection conn = s__CGSDefaultConnection();
|
||||
|
|
@ -1552,8 +1556,7 @@ OSXScreen::setGlobalHotKeysEnabled(bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
OSXScreen::getGlobalHotKeysEnabled()
|
||||
bool OSXScreen::getGlobalHotKeysEnabled()
|
||||
{
|
||||
CGSGlobalHotKeyOperatingMode mode;
|
||||
if (isGlobalHotKeyOperatingModeAvailable()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue