Add option to disable pointer button mapping
In case the old behaviour of not reverse-mapping the mouse buttons is desirable, a command-line option is added to disable the mapping. This option is made experimental for the time being. The default is to do the reverse mapping, as this is the intuitive behaviour (the mouse then works as it would on the console).
This commit is contained in:
parent
9f43291126
commit
600d3c5ccb
@ -1045,7 +1045,10 @@ static void xf_button_map_init (xfContext* xfc)
|
||||
};
|
||||
|
||||
/* query system for actual remapping */
|
||||
xf_get_x11_button_map (xfc, x11_map);
|
||||
if (!xfc->settings->UnmapButtons)
|
||||
{
|
||||
xf_get_x11_button_map (xfc, x11_map);
|
||||
}
|
||||
|
||||
/* iterate over all (mapped) physical buttons; for each of them */
|
||||
/* find the logical button in X11, and assign to this the */
|
||||
|
@ -107,6 +107,7 @@ COMMAND_LINE_ARGUMENT_A args[] =
|
||||
{ "usb", COMMAND_LINE_VALUE_REQUIRED, "[dbg][dev][id|addr][auto]", NULL, NULL, -1, NULL, "Redirect USB device" },
|
||||
{ "multitouch", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Redirect multitouch input" },
|
||||
{ "gestures", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Consume multitouch input locally" },
|
||||
{ "unmap-buttons", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Let server see real physical pointer button"},
|
||||
{ "echo", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, "echo", "Echo channel" },
|
||||
{ "disp", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "Display control" },
|
||||
{ "fonts", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "Smooth fonts (ClearType)" },
|
||||
@ -2142,6 +2143,10 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings,
|
||||
{
|
||||
settings->GrabKeyboard = arg->Value ? TRUE : FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "unmap-buttons")
|
||||
{
|
||||
settings->UnmapButtons = arg->Value ? TRUE : FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "toggle-fullscreen")
|
||||
{
|
||||
settings->ToggleFullscreen = arg->Value ? TRUE : FALSE;
|
||||
|
@ -1422,6 +1422,7 @@ struct rdp_settings
|
||||
/*
|
||||
* Extensions
|
||||
*/
|
||||
ALIGN64 BOOL UnmapButtons;
|
||||
|
||||
/* Extensions */
|
||||
ALIGN64 int num_extensions; /* */
|
||||
|
@ -262,6 +262,7 @@ rdpSettings* freerdp_settings_new(DWORD flags)
|
||||
settings->ToggleFullscreen = TRUE;
|
||||
settings->DesktopPosX = 0;
|
||||
settings->DesktopPosY = 0;
|
||||
settings->UnmapButtons = FALSE;
|
||||
|
||||
settings->PerformanceFlags = PERF_FLAG_NONE;
|
||||
settings->AllowFontSmoothing = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user