242 |
|
|
243 |
ui_seamless_begin(); |
ui_seamless_begin(); |
244 |
} |
} |
245 |
|
else if (!strcmp("ACK", tok1)) |
246 |
|
{ |
247 |
|
unsigned int serial; |
248 |
|
|
249 |
|
serial = strtoul(tok3, &endptr, 0); |
250 |
|
if (*endptr) |
251 |
|
return False; |
252 |
|
|
253 |
|
ui_seamless_ack(serial); |
254 |
|
} |
255 |
|
|
256 |
|
|
257 |
xfree(l); |
xfree(l); |
307 |
} |
} |
308 |
|
|
309 |
|
|
310 |
static void |
static unsigned int |
311 |
seamless_send(const char *command, const char *format, ...) |
seamless_send(const char *command, const char *format, ...) |
312 |
{ |
{ |
313 |
STREAM s; |
STREAM s; |
333 |
s = channel_init(seamless_channel, len); |
s = channel_init(seamless_channel, len); |
334 |
out_uint8p(s, buf, len) s_mark_end(s); |
out_uint8p(s, buf, len) s_mark_end(s); |
335 |
|
|
|
seamless_serial++; |
|
|
|
|
336 |
DEBUG_SEAMLESS(("SeamlessRDP sending:%s", buf)); |
DEBUG_SEAMLESS(("SeamlessRDP sending:%s", buf)); |
337 |
|
|
338 |
#if 0 |
#if 0 |
341 |
#endif |
#endif |
342 |
|
|
343 |
channel_send(s, seamless_channel); |
channel_send(s, seamless_channel); |
344 |
|
|
345 |
|
return seamless_serial++; |
346 |
} |
} |
347 |
|
|
348 |
|
|
349 |
void |
unsigned int |
350 |
seamless_send_sync() |
seamless_send_sync() |
351 |
{ |
{ |
352 |
if (!g_seamless_rdp) |
if (!g_seamless_rdp) |
353 |
return; |
return (unsigned int) -1; |
354 |
|
|
355 |
seamless_send("SYNC", ""); |
return seamless_send("SYNC", ""); |
356 |
} |
} |
357 |
|
|
358 |
|
|
359 |
void |
unsigned int |
360 |
seamless_send_state(unsigned long id, unsigned int state, unsigned long flags) |
seamless_send_state(unsigned long id, unsigned int state, unsigned long flags) |
361 |
{ |
{ |
362 |
if (!g_seamless_rdp) |
if (!g_seamless_rdp) |
363 |
return; |
return (unsigned int) -1; |
364 |
|
|
365 |
seamless_send("STATE", "0x%08lx,0x%x,0x%lx", id, state, flags); |
return seamless_send("STATE", "0x%08lx,0x%x,0x%lx", id, state, flags); |
366 |
} |
} |
367 |
|
|
368 |
|
|
369 |
void |
unsigned int |
370 |
seamless_send_position(unsigned long id, int x, int y, int width, int height, unsigned long flags) |
seamless_send_position(unsigned long id, int x, int y, int width, int height, unsigned long flags) |
371 |
{ |
{ |
372 |
seamless_send("POSITION", "0x%08lx,%d,%d,%d,%d,0x%lx", id, x, y, width, height, flags); |
return seamless_send("POSITION", "0x%08lx,%d,%d,%d,%d,0x%lx", id, x, y, width, height, |
373 |
|
flags); |
374 |
} |
} |
375 |
|
|
376 |
|
|
390 |
} |
} |
391 |
} |
} |
392 |
|
|
393 |
void |
unsigned int |
394 |
seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags) |
seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags) |
395 |
{ |
{ |
396 |
if (!g_seamless_rdp) |
if (!g_seamless_rdp) |
397 |
return; |
return (unsigned int) -1; |
398 |
|
|
399 |
seamless_send("ZCHANGE", "0x%08lx,0x%08lx,0x%lx", id, below, flags); |
return seamless_send("ZCHANGE", "0x%08lx,0x%08lx,0x%lx", id, below, flags); |
400 |
} |
} |
401 |
|
|
402 |
|
|
403 |
void |
unsigned int |
404 |
seamless_send_focus(unsigned long id, unsigned long flags) |
seamless_send_focus(unsigned long id, unsigned long flags) |
405 |
{ |
{ |
406 |
if (!g_seamless_rdp) |
if (!g_seamless_rdp) |
407 |
return; |
return (unsigned int) -1; |
408 |
|
|
409 |
seamless_send("FOCUS", "0x%08lx,0x%lx", id, flags); |
return seamless_send("FOCUS", "0x%08lx,0x%lx", id, flags); |
410 |
} |
} |