From b8a1d04ffb9301c937d8a6f92ddb13b4d2519e3b Mon Sep 17 00:00:00 2001 From: Karl Mikaelsson Date: Mon, 16 Oct 2017 13:55:39 +0200 Subject: [PATCH] Use system default pointer when requested Solves problem with hidden cursors at login screen (part of issue #165) Signed-off-by: Karl Mikaelsson Signed-off-by: Henrik Andersson --- proto.h | 1 + rdp.c | 4 +++- xwin.c | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/proto.h b/proto.h index 6bb56566..6e776327 100644 --- a/proto.h +++ b/proto.h @@ -275,6 +275,7 @@ RD_HCURSOR ui_create_cursor(unsigned int x, unsigned int y, int width, int heigh void ui_set_cursor(RD_HCURSOR cursor); void ui_destroy_cursor(RD_HCURSOR cursor); void ui_set_null_cursor(void); +void ui_set_standard_cursor(void); RD_HCOLOURMAP ui_create_colourmap(COLOURMAP * colours); void ui_destroy_colourmap(RD_HCOLOURMAP map); void ui_set_colourmap(RD_HCOLOURMAP map); diff --git a/rdp.c b/rdp.c index 65bf1f8c..bbcf97cd 100644 --- a/rdp.c +++ b/rdp.c @@ -1222,7 +1222,9 @@ set_system_pointer(uint32 ptr) case SYSPTR_NULL: ui_set_null_cursor(); break; - + case SYSPTR_DEFAULT: + ui_set_standard_cursor(); + break; default: logger(Protocol, Warning, "set_system_pointer(), unhandled pointer type 0x%x", diff --git a/xwin.c b/xwin.c index 3ff87975..0f31cb55 100644 --- a/xwin.c +++ b/xwin.c @@ -3103,6 +3103,12 @@ ui_set_null_cursor(void) ui_set_cursor(g_null_cursor); } +void +ui_set_standard_cursor(void) +{ + XUndefineCursor(g_display, g_wnd); +} + #define MAKE_XCOLOR(xc,c) \ (xc)->red = ((c)->red << 8) | (c)->red; \ (xc)->green = ((c)->green << 8) | (c)->green; \