summaryrefslogtreecommitdiffstats
path: root/xrdp
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2012-05-22 08:27:09 -0700
committerJay Sorg <jay.sorg@gmail.com>2012-05-22 08:27:09 -0700
commit900a2541ca94b5c4cb839c3bd6d35e6460ca1c48 (patch)
tree97dc231f119bfdc6a144a353d941bb44839e6579 /xrdp
parente09f14e6d47f1b67a42f8765b87f4eb405616319 (diff)
downloadxrdp-proprietary-900a2541ca94b5c4cb839c3bd6d35e6460ca1c48.tar.gz
xrdp-proprietary-900a2541ca94b5c4cb839c3bd6d35e6460ca1c48.zip
offscreen bitmaps: implement the delete list
Diffstat (limited to 'xrdp')
-rw-r--r--xrdp/xrdp.h2
-rw-r--r--xrdp/xrdp_cache.c11
-rw-r--r--xrdp/xrdp_painter.c9
-rw-r--r--xrdp/xrdp_types.h1
4 files changed, 21 insertions, 2 deletions
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index bc22a935..9b280bfc 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -27,6 +27,7 @@
#include "arch.h"
#include "parse.h"
#include "trans.h"
+#include "list.h"
#include "libxrdpinc.h"
#include "xrdp_types.h"
#include "xrdp_constants.h"
@@ -34,7 +35,6 @@
#include "os_calls.h"
#include "ssl_calls.h"
#include "thread_calls.h"
-#include "list.h"
#include "file.h"
#include "file_loc.h"
#include "xrdp_client_info.h"
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;
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c
index ada8a65b..b7caee31 100644
--- a/xrdp/xrdp_painter.c
+++ b/xrdp/xrdp_painter.c
@@ -52,6 +52,8 @@ int APP_CC
wm_painter_set_target(struct xrdp_painter* self)
{
int surface_index;
+ int index;
+ struct list* del_list;
if (self->wm->target_surface->type == WND_TYPE_SCREEN)
{
@@ -68,10 +70,15 @@ wm_painter_set_target(struct xrdp_painter* self)
{
if (self->wm->target_surface->tab_stop == 0) /* tab_stop is hack */
{
+ del_list = self->wm->cache->xrdp_os_del_list;
+ index = list_index_of(del_list, surface_index);
+ list_remove_item(del_list, index);
libxrdp_orders_send_create_os_surface(self->session, surface_index,
self->wm->target_surface->width,
- self->wm->target_surface->height, 0, 0);
+ self->wm->target_surface->height,
+ del_list);
self->wm->target_surface->tab_stop = 1;
+ list_clear(del_list);
}
libxrdp_orders_send_switch_os_surface(self->session, surface_index);
self->wm->current_surface_index = surface_index;
diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h
index a54fd85c..ce646a66 100644
--- a/xrdp/xrdp_types.h
+++ b/xrdp/xrdp_types.h
@@ -184,6 +184,7 @@ struct xrdp_cache
int brush_stamp;
struct xrdp_brush_item brush_items[64];
struct xrdp_os_bitmap_item os_bitmap_items[2000];
+ struct list* xrdp_os_del_list;
};
struct xrdp_mm