diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-03-18 23:43:17 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-03-18 23:43:17 -0700 |
commit | 12f7cd64f1642130b82f112b57e7a7993932cf1f (patch) | |
tree | 348dca0607e223dc7cad90db84fc07e96f218ba6 /xrdp/xrdp_wm.c | |
parent | 561b263b9141cb56f315d754920bf07e26af7317 (diff) | |
download | xrdp-proprietary-12f7cd64f1642130b82f112b57e7a7993932cf1f.tar.gz xrdp-proprietary-12f7cd64f1642130b82f112b57e7a7993932cf1f.zip |
work on new(color) cursors
Diffstat (limited to 'xrdp/xrdp_wm.c')
-rw-r--r-- | xrdp/xrdp_wm.c | 14 |
1 files changed, 11 insertions, 3 deletions
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; |