summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/file.h8
-rw-r--r--common/list.h24
-rw-r--r--common/parse.h2
-rw-r--r--xrdp/xrdp.h6
-rw-r--r--xrdp/xrdp_interface.c12
-rw-r--r--xrdp/xrdp_painter.c27
6 files changed, 63 insertions, 16 deletions
diff --git a/common/file.h b/common/file.h
index 86ca684f..0626d5ae 100644
--- a/common/file.h
+++ b/common/file.h
@@ -21,8 +21,10 @@
#if !defined(FILE_H)
#define FILE_H
-int file_read_sections(int fd, struct list* names);
-int file_read_section(int fd, char* section, struct list* names,
- struct list* values);
+int
+file_read_sections(int fd, struct list* names);
+int
+file_read_section(int fd, char* section, struct list* names,
+ struct list* values);
#endif
diff --git a/common/list.h b/common/list.h
index c0c7b060..46e82cb3 100644
--- a/common/list.h
+++ b/common/list.h
@@ -31,13 +31,21 @@ struct list
int auto_free;
};
-struct list* list_create(void);
-void list_delete(struct list* self);
-void list_add_item(struct list* self, long item);
-long list_get_item(struct list* self, int index);
-void list_clear(struct list* self);
-int list_index_of(struct list* self, long item);
-void list_remove_item(struct list* self, int index);
-void list_insert_item(struct list* self, int index, long item);
+struct list*
+list_create(void);
+void
+list_delete(struct list* self);
+void
+list_add_item(struct list* self, long item);
+long
+list_get_item(struct list* self, int index);
+void
+list_clear(struct list* self);
+int
+list_index_of(struct list* self, long item);
+void
+list_remove_item(struct list* self, int index);
+void
+list_insert_item(struct list* self, int index, long item);
#endif
diff --git a/common/parse.h b/common/parse.h
index 3c8b3fe6..288ae91a 100644
--- a/common/parse.h
+++ b/common/parse.h
@@ -24,6 +24,8 @@
#if !defined(PARSE_H)
#define PARSE_H
+#include "arch.h"
+
#if defined(L_ENDIAN)
#elif defined(B_ENDIAN)
#else
diff --git a/xrdp/xrdp.h b/xrdp/xrdp.h
index 4a23a0a8..b9e7bb90 100644
--- a/xrdp/xrdp.h
+++ b/xrdp/xrdp.h
@@ -221,6 +221,12 @@ int APP_CC
xrdp_painter_draw_text(struct xrdp_painter* self,
struct xrdp_bitmap* bitmap,
int x, int y, char* text);
+int APP_CC
+xrdp_painter_copy(struct xrdp_painter* self,
+ struct xrdp_bitmap* src,
+ struct xrdp_bitmap* dst,
+ int x, int y, int cx, int cy,
+ int srcx, int srcy, int opcode);
/* xrdp_font.c */
struct xrdp_font* APP_CC
diff --git a/xrdp/xrdp_interface.c b/xrdp/xrdp_interface.c
index 4b674e5e..09588e2a 100644
--- a/xrdp/xrdp_interface.c
+++ b/xrdp/xrdp_interface.c
@@ -126,11 +126,12 @@ server_screen_blt(struct xrdp_mod* mod, int x, int y, int cx, int cy,
int srcx, int srcy)
{
struct xrdp_wm* wm;
+ struct xrdp_painter* p;
wm = (struct xrdp_wm*)mod->wm;
- libxrdp_orders_init(wm->session);
- libxrdp_orders_screen_blt(wm->session, x, y, cx, cy, srcx, srcy, 0xcc, 0);
- libxrdp_orders_send(wm->session);
+ p = (struct xrdp_painter*)mod->painter;
+ xrdp_painter_copy(p, wm->screen, wm->screen, x, y, cx, cy,
+ srcx, srcy, 12);
return 0;
}
@@ -141,11 +142,12 @@ server_paint_rect(struct xrdp_mod* mod, int x, int y, int cx, int cy,
{
struct xrdp_wm* wm;
struct xrdp_bitmap* b;
+ struct xrdp_painter* p;
wm = (struct xrdp_wm*)mod->wm;
+ p = (struct xrdp_painter*)mod->painter;
b = xrdp_bitmap_create_with_data(cx, cy, wm->screen->bpp, data, wm);
- xrdp_painter_draw_bitmap((struct xrdp_painter*)mod->painter,
- wm->screen, b, x, y, cx, cy);
+ xrdp_painter_draw_bitmap(p, wm->screen, b, x, y, cx, cy);
xrdp_bitmap_delete(b);
return 0;
}
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c
index a2ddbe55..44ea52fa 100644
--- a/xrdp/xrdp_painter.c
+++ b/xrdp/xrdp_painter.c
@@ -614,3 +614,30 @@ xrdp_painter_draw_text(struct xrdp_painter* self,
g_free(data);
return 0;
}
+
+/*****************************************************************************/
+int APP_CC
+xrdp_painter_copy(struct xrdp_painter* self,
+ struct xrdp_bitmap* src,
+ struct xrdp_bitmap* dst,
+ int x, int y, int cx, int cy,
+ int srcx, int srcy, int opcode)
+{
+ if (self == 0 || src == 0 || dst == 0)
+ {
+ return 0;
+ }
+
+ /* todo data */
+
+ if (dst->type == WND_TYPE_BITMAP)
+ {
+ return 0;
+ }
+ if (src == dst && opcode == 12 && src->wm->screen == src)
+ {
+ libxrdp_orders_screen_blt(dst->wm->session, x, y, cx, cy,
+ srcx, srcy, 12, 0);
+ }
+ return 0;
+}