mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
[server,shadow] add option to hide mouse cursor
This commit is contained in:
@@ -179,6 +179,7 @@ extern "C"
|
||||
|
||||
size_t maxClientsConnected;
|
||||
BOOL SupportMultiRectBitmapUpdates; /** @since version 3.13.0 */
|
||||
BOOL ShowMouseCursor; /** @since version 3.14.2 */
|
||||
};
|
||||
|
||||
struct rdp_shadow_surface
|
||||
|
||||
@@ -48,6 +48,8 @@ int main(int argc, char** argv)
|
||||
NULL, NULL, -1, NULL,
|
||||
"An address to bind to. Use '[<ipv6>]' for IPv6 addresses, e.g. '[::1]' for "
|
||||
"localhost" },
|
||||
{ "server-side-cursor", COMMAND_LINE_VALUE_BOOL, NULL, NULL, NULL, -1, NULL,
|
||||
"hide mouse cursor in RDP client." },
|
||||
{ "monitors", COMMAND_LINE_VALUE_OPTIONAL, "<0,1,2...>", NULL, NULL, -1, NULL,
|
||||
"Select or list monitors" },
|
||||
{ "max-connections", COMMAND_LINE_VALUE_REQUIRED, "<number>", 0, NULL, -1, NULL,
|
||||
@@ -148,7 +150,7 @@ int main(int argc, char** argv)
|
||||
|
||||
if ((status = shadow_server_parse_command_line(server, argc, argv, shadow_args)) < 0)
|
||||
{
|
||||
shadow_server_command_line_status_print(server, argc, argv, status, shadow_args);
|
||||
status = shadow_server_command_line_status_print(server, argc, argv, status, shadow_args);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -2179,7 +2179,16 @@ static int shadow_client_subsystem_process_message(rdpShadowClient* client, wMes
|
||||
if (client->activated)
|
||||
{
|
||||
IFCALL(update->pointer->PointerNew, context, &pointerNew);
|
||||
IFCALL(update->pointer->PointerCached, context, &pointerCached);
|
||||
if (client->server->ShowMouseCursor)
|
||||
{
|
||||
IFCALL(update->pointer->PointerCached, context, &pointerCached);
|
||||
}
|
||||
else
|
||||
{
|
||||
POINTER_SYSTEM_UPDATE pointer_system = { 0 };
|
||||
pointer_system.type = SYSPTR_NULL;
|
||||
IFCALL(update->pointer->PointerSystem, context, &pointer_system);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -244,6 +244,10 @@ int shadow_server_parse_command_line(rdpShadowServer* server, int argc, char** a
|
||||
{
|
||||
server->mayInteract = arg->Value ? TRUE : FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "server-side-cursor")
|
||||
{
|
||||
server->ShowMouseCursor = arg->Value ? TRUE : FALSE;
|
||||
}
|
||||
CommandLineSwitchCase(arg, "mouse-relative")
|
||||
{
|
||||
const BOOL val = arg->Value ? TRUE : FALSE;
|
||||
|
||||
Reference in New Issue
Block a user