Fix text2 order parsing. The brush is parsed but not yet used.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@842 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
d37d8bd663
commit
8bc5e0ad3f
38
orders.c
38
orders.c
@ -805,7 +805,7 @@ process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, BOOL delta)
|
||||
in_uint8(s, os->flags);
|
||||
|
||||
if (present & 0x000004)
|
||||
in_uint8(s, os->unknown);
|
||||
in_uint8(s, os->opcode);
|
||||
|
||||
if (present & 0x000008)
|
||||
in_uint8(s, os->mixmode);
|
||||
@ -840,27 +840,7 @@ process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, BOOL delta)
|
||||
if (present & 0x002000)
|
||||
in_uint16_le(s, os->boxbottom);
|
||||
|
||||
/*
|
||||
* Unknown members, seen when connecting to a session that was disconnected with
|
||||
* mstsc and with wintach's spreadsheet test.
|
||||
*/
|
||||
if (present & 0x004000)
|
||||
in_uint8s(s, 1);
|
||||
|
||||
if (present & 0x008000)
|
||||
in_uint8s(s, 1);
|
||||
|
||||
if (present & 0x010000)
|
||||
{
|
||||
in_uint8s(s, 1); /* guessing the length here */
|
||||
warning("Unknown order state member (0x010000) in text2 order.\n");
|
||||
}
|
||||
|
||||
if (present & 0x020000)
|
||||
in_uint8s(s, 4);
|
||||
|
||||
if (present & 0x040000)
|
||||
in_uint8s(s, 4);
|
||||
rdp_parse_brush(s, &os->brush, present >> 14);
|
||||
|
||||
if (present & 0x080000)
|
||||
in_uint16_le(s, os->x);
|
||||
@ -874,7 +854,7 @@ process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, BOOL delta)
|
||||
in_uint8a(s, os->text, os->length);
|
||||
}
|
||||
|
||||
DEBUG(("TEXT2(x=%d,y=%d,cl=%d,ct=%d,cr=%d,cb=%d,bl=%d,bt=%d,bb=%d,br=%d,fg=0x%x,bg=0x%x,font=%d,fl=0x%x,mix=%d,unk=0x%x,n=%d)\n", os->x, os->y, os->clipleft, os->cliptop, os->clipright, os->clipbottom, os->boxleft, os->boxtop, os->boxright, os->boxbottom, os->fgcolour, os->bgcolour, os->font, os->flags, os->mixmode, os->unknown, os->length));
|
||||
DEBUG(("TEXT2(x=%d,y=%d,cl=%d,ct=%d,cr=%d,cb=%d,bl=%d,bt=%d,br=%d,bb=%d,bs=%d,bg=0x%x,fg=0x%x,font=%d,fl=0x%x,op=0x%x,mix=%d,n=%d)\n", os->x, os->y, os->clipleft, os->cliptop, os->clipright, os->clipbottom, os->boxleft, os->boxtop, os->boxright, os->boxbottom, os->brush.style, os->bgcolour, os->fgcolour, os->font, os->flags, os->opcode, os->mixmode, os->length));
|
||||
|
||||
DEBUG(("Text: "));
|
||||
|
||||
@ -883,13 +863,11 @@ process_text2(STREAM s, TEXT2_ORDER * os, uint32 present, BOOL delta)
|
||||
|
||||
DEBUG(("\n"));
|
||||
|
||||
ui_draw_text(os->font, os->flags, os->mixmode, os->x, os->y,
|
||||
os->clipleft, os->cliptop,
|
||||
os->clipright - os->clipleft,
|
||||
os->clipbottom - os->cliptop,
|
||||
os->boxleft, os->boxtop,
|
||||
os->boxright - os->boxleft,
|
||||
os->boxbottom - os->boxtop, os->bgcolour, os->fgcolour, os->text, os->length);
|
||||
ui_draw_text(os->font, os->flags, os->opcode - 1, os->mixmode, os->x, os->y,
|
||||
os->clipleft, os->cliptop, os->clipright - os->clipleft,
|
||||
os->clipbottom - os->cliptop, os->boxleft, os->boxtop,
|
||||
os->boxright - os->boxleft, os->boxbottom - os->boxtop,
|
||||
&os->brush, os->bgcolour, os->fgcolour, os->text, os->length);
|
||||
}
|
||||
|
||||
/* Process a raw bitmap cache order */
|
||||
|
5
orders.h
5
orders.h
@ -246,10 +246,10 @@ typedef struct _TEXT2_ORDER
|
||||
{
|
||||
uint8 font;
|
||||
uint8 flags;
|
||||
uint8 opcode;
|
||||
uint8 mixmode;
|
||||
uint8 unknown;
|
||||
uint32 fgcolour;
|
||||
uint32 bgcolour;
|
||||
uint32 fgcolour;
|
||||
sint16 clipleft;
|
||||
sint16 cliptop;
|
||||
sint16 clipright;
|
||||
@ -258,6 +258,7 @@ typedef struct _TEXT2_ORDER
|
||||
sint16 boxtop;
|
||||
sint16 boxright;
|
||||
sint16 boxbottom;
|
||||
BRUSH brush;
|
||||
sint16 x;
|
||||
sint16 y;
|
||||
uint8 length;
|
||||
|
7
proto.h
7
proto.h
@ -217,8 +217,9 @@ void ui_ellipse(uint8 opcode, uint8 fillmode, int x, int y, int cx, int cy, BRUS
|
||||
int bgcolour, int fgcolour);
|
||||
void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy,
|
||||
int bgcolour, int fgcolour);
|
||||
void ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y, int clipx, int clipy,
|
||||
int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, int bgcolour,
|
||||
int fgcolour, uint8 * text, uint8 length);
|
||||
void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y,
|
||||
int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy,
|
||||
int boxcx, int boxcy, BRUSH * brush, int bgcolour, int fgcolour,
|
||||
uint8 * text, uint8 length);
|
||||
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
|
||||
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);
|
||||
|
8
xwin.c
8
xwin.c
@ -2376,11 +2376,13 @@ ui_draw_glyph(int mixmode,
|
||||
}
|
||||
|
||||
void
|
||||
ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y,
|
||||
ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode, int x, int y,
|
||||
int clipx, int clipy, int clipcx, int clipcy,
|
||||
int boxx, int boxy, int boxcx, int boxcy, int bgcolour,
|
||||
int fgcolour, uint8 * text, uint8 length)
|
||||
int boxx, int boxy, int boxcx, int boxcy, BRUSH * brush,
|
||||
int bgcolour, int fgcolour, uint8 * text, uint8 length)
|
||||
{
|
||||
/* TODO: use brush appropriately */
|
||||
|
||||
FONTGLYPH *glyph;
|
||||
int i, j, xyoffset, x1, y1;
|
||||
DATABLOB *entry;
|
||||
|
Loading…
Reference in New Issue
Block a user