diff options
Diffstat (limited to 'xrdp')
-rw-r--r-- | xrdp/xrdp.h | 6 | ||||
-rw-r--r-- | xrdp/xrdp_mm.c | 17 | ||||
-rw-r--r-- | xrdp/xrdp_types.h | 6 | ||||
-rw-r--r-- | xrdp/xrdp_wm.c | 14 |
4 files changed, 35 insertions, 8 deletions
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index 123551fa..ed653741 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -128,7 +128,8 @@ int APP_CC xrdp_wm_send_pointer(struct xrdp_wm* self, int cache_idx, char* data, char* mask, int x, int y, int bpp); int APP_CC -xrdp_wm_pointer(struct xrdp_wm* self, char* data, char* mask, int x, int y); +xrdp_wm_pointer(struct xrdp_wm* self, char* data, char* mask, int x, int y, + int bpp); int callback(long id, int msg, long param1, long param2, long param3, long param4); int APP_CC @@ -376,6 +377,9 @@ int DEFAULT_CC server_set_pointer(struct xrdp_mod* mod, int x, int y, char* data, char* mask); int DEFAULT_CC +server_set_pointer_ex(struct xrdp_mod* mod, int x, int y, + char* data, char* mask, int bpp); +int DEFAULT_CC server_palette(struct xrdp_mod* mod, int* palette); int DEFAULT_CC server_msg(struct xrdp_mod* mod, char* msg, int code); diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c index 6c01c85c..cd4006f4 100644 --- a/xrdp/xrdp_mm.c +++ b/xrdp/xrdp_mm.c @@ -1,7 +1,7 @@ /** * xrdp: A Remote Desktop Protocol server. * - * Copyright (C) Jay Sorg 2004-2012 + * Copyright (C) Jay Sorg 2004-2013 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -383,6 +383,7 @@ xrdp_mm_setup_mod1(struct xrdp_mm *self) self->mod->server_screen_blt = server_screen_blt; self->mod->server_paint_rect = server_paint_rect; self->mod->server_set_pointer = server_set_pointer; + self->mod->server_set_pointer_ex = server_set_pointer_ex; self->mod->server_palette = server_palette; self->mod->server_msg = server_msg; self->mod->server_is_term = server_is_term; @@ -1802,7 +1803,19 @@ server_set_pointer(struct xrdp_mod *mod, int x, int y, struct xrdp_wm *wm; wm = (struct xrdp_wm *)(mod->wm); - xrdp_wm_pointer(wm, data, mask, x, y); + xrdp_wm_pointer(wm, data, mask, x, y, 0); + return 0; +} + +/*****************************************************************************/ +int DEFAULT_CC +server_set_pointer_ex(struct xrdp_mod *mod, int x, int y, + char *data, char *mask, int bpp) +{ + struct xrdp_wm *wm; + + wm = (struct xrdp_wm *)(mod->wm); + xrdp_wm_pointer(wm, data, mask, x, y, bpp); return 0; } diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index a4b4bc7a..e7bb7baf 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -1,7 +1,7 @@ /** * xrdp: A Remote Desktop Protocol server. * - * Copyright (C) Jay Sorg 2004-2012 + * Copyright (C) Jay Sorg 2004-2013 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -115,8 +115,10 @@ struct xrdp_mod int (*server_monitored_desktop)(struct xrdp_mod* mod, struct rail_monitored_desktop_order* mdo, int flags); + int (*server_set_pointer_ex)(struct xrdp_mod* v, int x, int y, char* data, + char* mask, int bpp); - long server_dumby[100 - 37]; /* align, 100 minus the number of server + long server_dumby[100 - 38]; /* align, 100 minus the number of server functions above */ /* common */ long handle; /* pointer to self as int */ diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 0aa0beed..89adc61b 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -1,7 +1,7 @@ /** * xrdp: A Remote Desktop Protocol server. * - * Copyright (C) Jay Sorg 2004-2012 + * Copyright (C) Jay Sorg 2004-2013 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -180,14 +180,22 @@ xrdp_wm_get_pixel(char *data, int x, int y, int width, int bpp) /*****************************************************************************/ int APP_CC -xrdp_wm_pointer(struct xrdp_wm *self, char *data, char *mask, int x, int y) +xrdp_wm_pointer(struct xrdp_wm *self, char *data, char *mask, int x, int y, + int bpp) { + int bytes; struct xrdp_pointer_item pointer_item; + if (bpp == 0) + { + bpp = 24; + } + bytes = ((bpp + 7) / 8) * 32 * 32; g_memset(&pointer_item, 0, sizeof(struct xrdp_pointer_item)); pointer_item.x = x; pointer_item.y = y; - g_memcpy(pointer_item.data, data, 32 * 32 * 3); + pointer_item.bpp = bpp; + g_memcpy(pointer_item.data, data, bytes); g_memcpy(pointer_item.mask, mask, 32 * 32 / 8); self->screen->pointer = xrdp_cache_add_pointer(self->cache, &pointer_item); return 0; |