Skip to content

Commit

Permalink
Merge pull request #170 from derfian/system-default-pointer
Browse files Browse the repository at this point in the history
Use system default pointer when requested
  • Loading branch information
hean01-cendio committed Oct 16, 2017
2 parents 0e530e6 + b8a1d04 commit 8e3ec9e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions proto.h
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion rdp.c
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions xwin.c
Expand Up @@ -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; \
Expand Down

0 comments on commit 8e3ec9e

Please sign in to comment.