Added seamless_reset_state() and use it whenever a

new window is created. This fixes issues with seamless
protocol parser between reconnects.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1820 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Henrik Andersson 2014-07-02 08:25:07 +00:00
parent d0b0e731d9
commit 2ceb56e0d4
3 changed files with 13 additions and 2 deletions

View File

@ -336,6 +336,7 @@ void ui_seamless_ack(unsigned int serial);
RD_BOOL lspci_init(void);
/* seamless.c */
RD_BOOL seamless_init(void);
void seamless_reset_state(void);
unsigned int seamless_send_sync(void);
unsigned int seamless_send_state(unsigned long id, unsigned int state, unsigned long flags);
unsigned int seamless_send_position(unsigned long id, int x, int y, int width, int height,

View File

@ -32,6 +32,7 @@
extern RD_BOOL g_seamless_rdp;
static VCHANNEL *seamless_channel;
static unsigned int seamless_serial;
static char *seamless_rest = NULL;
static char icon_buf[1024];
static char *
@ -373,7 +374,6 @@ static void
seamless_process(STREAM s)
{
unsigned int pkglen;
static char *rest = NULL;
char *buf;
pkglen = s->end - s->p;
@ -385,7 +385,7 @@ seamless_process(STREAM s)
hexdump(s->p, pkglen);
#endif
str_handle_lines(buf, &rest, seamless_line_handler, NULL);
str_handle_lines(buf, &seamless_rest, seamless_line_handler, NULL);
xfree(buf);
}
@ -405,6 +405,15 @@ seamless_init(void)
return (seamless_channel != NULL);
}
void
seamless_reset_state(void)
{
if (seamless_rest != NULL)
{
xfree(seamless_rest);
seamless_rest = NULL;
}
}
static unsigned int
seamless_send(const char *command, const char *format, ...)

1
xwin.c
View File

@ -2121,6 +2121,7 @@ ui_create_window(void)
if (g_seamless_rdp)
{
seamless_reset_state();
seamless_restack_test();
}