diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-03-12 22:50:10 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-03-12 22:50:10 -0700 |
commit | 494150f1a9fd8ae717b8f4e41f6e13f6f89d3bef (patch) | |
tree | ca403563b6eace7c7453e2160f22c6262c117c86 /xrdp | |
parent | a47a3cee1af35b404df371ad0d19eee1cdd943c7 (diff) | |
download | xrdp-proprietary-494150f1a9fd8ae717b8f4e41f6e13f6f89d3bef.tar.gz xrdp-proprietary-494150f1a9fd8ae717b8f4e41f6e13f6f89d3bef.zip |
work on new(color) cursors
Diffstat (limited to 'xrdp')
-rw-r--r-- | xrdp/xrdp.h | 2 | ||||
-rw-r--r-- | xrdp/xrdp_cache.c | 11 | ||||
-rw-r--r-- | xrdp/xrdp_types.h | 3 | ||||
-rw-r--r-- | xrdp/xrdp_wm.c | 19 |
4 files changed, 20 insertions, 15 deletions
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h index a98acb16..123551fa 100644 --- a/xrdp/xrdp.h +++ b/xrdp/xrdp.h @@ -126,7 +126,7 @@ int APP_CC xrdp_wm_pu(struct xrdp_wm* self, struct xrdp_bitmap* control); int APP_CC xrdp_wm_send_pointer(struct xrdp_wm* self, int cache_idx, - char* data, char* mask, int x, int y); + 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); int diff --git a/xrdp/xrdp_cache.c b/xrdp/xrdp_cache.c index 2c6f901a..50e1fa30 100644 --- a/xrdp/xrdp_cache.c +++ b/xrdp/xrdp_cache.c @@ -475,9 +475,10 @@ xrdp_cache_add_pointer(struct xrdp_cache *self, if (self->pointer_items[i].x == pointer_item->x && self->pointer_items[i].y == pointer_item->y && g_memcmp(self->pointer_items[i].data, - pointer_item->data, 32 * 32 * 3) == 0 && + pointer_item->data, 32 * 32 * 4) == 0 && g_memcmp(self->pointer_items[i].mask, - pointer_item->mask, 32 * 32 / 8) == 0) + pointer_item->mask, 32 * 32 / 8) == 0 && + self->pointer_items[i].bpp == pointer_item->bpp) { self->pointer_items[i].stamp = self->pointer_stamp; xrdp_wm_set_pointer(self->wm, i); @@ -511,7 +512,8 @@ xrdp_cache_add_pointer(struct xrdp_cache *self, self->pointer_items[index].data, self->pointer_items[index].mask, self->pointer_items[index].x, - self->pointer_items[index].y); + self->pointer_items[index].y, + self->pointer_items[index].bpp); self->wm->current_pointer = index; DEBUG(("adding pointer at %d", index)); return index; @@ -541,7 +543,8 @@ xrdp_cache_add_pointer_static(struct xrdp_cache *self, self->pointer_items[index].data, self->pointer_items[index].mask, self->pointer_items[index].x, - self->pointer_items[index].y); + self->pointer_items[index].y, + self->pointer_items[index].bpp); self->wm->current_pointer = index; DEBUG(("adding pointer at %d", index)); return index; diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index d99dced9..a4b4bc7a 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -170,8 +170,9 @@ struct xrdp_pointer_item int stamp; int x; /* hotspot */ int y; - char data[32 * 32 * 3]; + char data[32 * 32 * 4]; char mask[32 * 32 / 8]; + int bpp; }; struct xrdp_brush_item diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index ea7e286a..0aa0beed 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -292,9 +292,10 @@ xrdp_wm_load_pointer(struct xrdp_wm *self, char *file_name, char *data, /*****************************************************************************/ int APP_CC xrdp_wm_send_pointer(struct xrdp_wm *self, int cache_idx, - char *data, char *mask, int x, int y) + char *data, char *mask, int x, int y, int bpp) { - return libxrdp_send_pointer(self->session, cache_idx, data, mask, x, y); + return libxrdp_send_pointer(self->session, cache_idx, data, mask, + x, y, bpp); } /*****************************************************************************/ @@ -541,13 +542,13 @@ xrdp_wm_init(struct xrdp_wm *self) names->auto_free = 1; values = list_create(); values->auto_free = 1; - /* domain names that starts with '_' are reserved for IP/DNS to simplify - * for the user in a gateway setup */ - if(self->session->client_info->domain[0]!='_') - { - g_strncpy(section_name, self->session->client_info->domain, 255); - } - + /* domain names that starts with '_' are reserved for IP/DNS to + * simplify for the user in a gateway setup */ + if (self->session->client_info->domain[0] != '_') + { + g_strncpy(section_name, self->session->client_info->domain, + 255); + } if (section_name[0] == 0) { if (autorun_name[0] == 0) |