diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2012-05-22 08:27:09 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2012-05-22 08:27:09 -0700 |
commit | 900a2541ca94b5c4cb839c3bd6d35e6460ca1c48 (patch) | |
tree | 97dc231f119bfdc6a144a353d941bb44839e6579 /xrdp/xrdp_cache.c | |
parent | e09f14e6d47f1b67a42f8765b87f4eb405616319 (diff) | |
download | xrdp-proprietary-900a2541ca94b5c4cb839c3bd6d35e6460ca1c48.tar.gz xrdp-proprietary-900a2541ca94b5c4cb839c3bd6d35e6460ca1c48.zip |
offscreen bitmaps: implement the delete list
Diffstat (limited to 'xrdp/xrdp_cache.c')
-rw-r--r-- | xrdp/xrdp_cache.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xrdp/xrdp_cache.c b/xrdp/xrdp_cache.c index 32b32f72..9c708313 100644 --- a/xrdp/xrdp_cache.c +++ b/xrdp/xrdp_cache.c @@ -43,6 +43,7 @@ xrdp_cache_create(struct xrdp_wm* owner, self->bitmap_cache_persist_enable = client_info->bitmap_cache_persist_enable; self->bitmap_cache_version = client_info->bitmap_cache_version; self->pointer_cache_entries = client_info->pointer_cache_entries; + self->xrdp_os_del_list = list_create(); return self; } @@ -78,6 +79,7 @@ xrdp_cache_delete(struct xrdp_cache* self) { xrdp_bitmap_delete(self->os_bitmap_items[i].bitmap); } + list_delete(self->xrdp_os_del_list); g_free(self); } @@ -564,12 +566,21 @@ int APP_CC xrdp_cache_remove_os_bitmap(struct xrdp_cache* self, int rdpindex) { struct xrdp_os_bitmap_item* bi; + int index; if ((rdpindex < 0) || (rdpindex >= 2000)) { return 1; } bi = self->os_bitmap_items + rdpindex; + if (bi->bitmap->tab_stop) + { + index = list_index_of(self->xrdp_os_del_list, rdpindex); + if (index == -1) + { + list_add_item(self->xrdp_os_del_list, rdpindex); + } + } xrdp_bitmap_delete(bi->bitmap); g_memset(bi, 0, sizeof(struct xrdp_os_bitmap_item)); return 0; |