2006-03-10 09:50:43 +01:00
|
|
|
/* -*- c-basic-offset: 8 -*-
|
|
|
|
rdesktop: A Remote Desktop Protocol client.
|
|
|
|
Seamless Windows support
|
2007-01-04 06:39:39 +01:00
|
|
|
Copyright (C) Peter Astrand <astrand@cendio.se> 2005-2007
|
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
2007-01-04 06:39:39 +01:00
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2007-01-04 06:39:39 +01:00
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "rdesktop.h"
|
2006-03-10 16:19:52 +01:00
|
|
|
#include <stdarg.h>
|
2006-03-20 11:31:58 +01:00
|
|
|
#include <assert.h>
|
2006-03-10 09:50:43 +01:00
|
|
|
|
|
|
|
#ifdef WITH_DEBUG_SEAMLESS
|
|
|
|
#define DEBUG_SEAMLESS(args) printf args;
|
|
|
|
#else
|
|
|
|
#define DEBUG_SEAMLESS(args)
|
|
|
|
#endif
|
|
|
|
|
2007-01-08 05:47:06 +01:00
|
|
|
extern RD_BOOL g_seamless_rdp;
|
2006-03-10 09:50:43 +01:00
|
|
|
static VCHANNEL *seamless_channel;
|
2006-03-20 11:31:58 +01:00
|
|
|
static unsigned int seamless_serial;
|
2006-03-10 09:50:43 +01:00
|
|
|
|
|
|
|
static char *
|
|
|
|
seamless_get_token(char **s)
|
|
|
|
{
|
|
|
|
char *comma, *head;
|
|
|
|
head = *s;
|
|
|
|
|
|
|
|
if (!head)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
comma = strchr(head, ',');
|
|
|
|
if (comma)
|
|
|
|
{
|
|
|
|
*comma = '\0';
|
|
|
|
*s = comma + 1;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*s = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return head;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-01-08 05:47:06 +01:00
|
|
|
static RD_BOOL
|
2006-03-10 09:50:43 +01:00
|
|
|
seamless_process_line(const char *line, void *data)
|
|
|
|
{
|
|
|
|
char *p, *l;
|
|
|
|
char *tok1, *tok2, *tok3, *tok4, *tok5, *tok6, *tok7, *tok8;
|
|
|
|
unsigned long id, flags;
|
|
|
|
char *endptr;
|
|
|
|
|
|
|
|
l = xstrdup(line);
|
|
|
|
p = l;
|
|
|
|
|
2006-03-13 16:04:51 +01:00
|
|
|
DEBUG_SEAMLESS(("seamlessrdp got:%s\n", p));
|
2006-03-10 09:50:43 +01:00
|
|
|
|
|
|
|
tok1 = seamless_get_token(&p);
|
|
|
|
tok2 = seamless_get_token(&p);
|
|
|
|
tok3 = seamless_get_token(&p);
|
|
|
|
tok4 = seamless_get_token(&p);
|
|
|
|
tok5 = seamless_get_token(&p);
|
|
|
|
tok6 = seamless_get_token(&p);
|
|
|
|
tok7 = seamless_get_token(&p);
|
|
|
|
tok8 = seamless_get_token(&p);
|
|
|
|
|
2006-03-10 10:01:51 +01:00
|
|
|
if (!strcmp("CREATE", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
2006-03-21 15:42:25 +01:00
|
|
|
unsigned long group, parent;
|
|
|
|
if (!tok6)
|
2006-03-10 09:50:43 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
id = strtoul(tok3, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-21 15:42:25 +01:00
|
|
|
group = strtoul(tok4, &endptr, 0);
|
2006-03-10 13:44:32 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-21 15:42:25 +01:00
|
|
|
parent = strtoul(tok5, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-21 15:42:25 +01:00
|
|
|
flags = strtoul(tok6, &endptr, 0);
|
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_create_window(id, group, parent, flags);
|
2006-03-10 09:50:43 +01:00
|
|
|
}
|
2006-03-10 10:01:51 +01:00
|
|
|
else if (!strcmp("DESTROY", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok4)
|
2006-03-10 09:50:43 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
id = strtoul(tok3, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok4, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_destroy_window(id, flags);
|
|
|
|
|
|
|
|
}
|
2006-04-28 09:55:36 +02:00
|
|
|
else if (!strcmp("DESTROYGRP", tok1))
|
|
|
|
{
|
|
|
|
if (!tok4)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
id = strtoul(tok3, &endptr, 0);
|
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
flags = strtoul(tok4, &endptr, 0);
|
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_destroy_group(id, flags);
|
|
|
|
}
|
2006-03-10 10:01:51 +01:00
|
|
|
else if (!strcmp("SETICON", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
|
|
|
unimpl("SeamlessRDP SETICON1\n");
|
|
|
|
}
|
2006-03-10 10:01:51 +01:00
|
|
|
else if (!strcmp("POSITION", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
|
|
|
int x, y, width, height;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok8)
|
2006-03-10 09:50:43 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
id = strtoul(tok3, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
x = strtol(tok4, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
2006-03-20 11:31:58 +01:00
|
|
|
y = strtol(tok5, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
width = strtol(tok6, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
2006-03-20 11:31:58 +01:00
|
|
|
height = strtol(tok7, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok8, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_move_window(id, x, y, width, height, flags);
|
|
|
|
}
|
2006-03-10 10:01:51 +01:00
|
|
|
else if (!strcmp("ZCHANGE", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
2006-03-17 09:52:29 +01:00
|
|
|
unsigned long behind;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
id = strtoul(tok3, &endptr, 0);
|
2006-03-17 09:52:29 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
behind = strtoul(tok4, &endptr, 0);
|
2006-03-17 09:52:29 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok5, &endptr, 0);
|
2006-03-17 09:52:29 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_restack_window(id, behind, flags);
|
2006-03-10 09:50:43 +01:00
|
|
|
}
|
2006-03-10 11:40:50 +01:00
|
|
|
else if (!strcmp("TITLE", tok1))
|
|
|
|
{
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok5)
|
2006-03-10 11:40:50 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
id = strtoul(tok3, &endptr, 0);
|
2006-03-10 11:40:50 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok5, &endptr, 0);
|
2006-03-10 11:40:50 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
ui_seamless_settitle(id, tok4, flags);
|
2006-03-10 11:40:50 +01:00
|
|
|
}
|
|
|
|
else if (!strcmp("STATE", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
|
|
|
unsigned int state;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok5)
|
2006-03-10 09:50:43 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
id = strtoul(tok3, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
state = strtoul(tok4, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok5, &endptr, 0);
|
2006-03-10 09:50:43 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_setstate(id, state, flags);
|
|
|
|
}
|
2006-03-10 10:01:51 +01:00
|
|
|
else if (!strcmp("DEBUG", tok1))
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
2006-04-20 15:01:45 +02:00
|
|
|
DEBUG_SEAMLESS(("SeamlessRDP:%s\n", line));
|
2006-03-10 09:50:43 +01:00
|
|
|
}
|
2006-03-15 09:41:48 +01:00
|
|
|
else if (!strcmp("SYNCBEGIN", tok1))
|
|
|
|
{
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok3)
|
2006-03-15 09:41:48 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok3, &endptr, 0);
|
2006-03-15 09:41:48 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_syncbegin(flags);
|
|
|
|
}
|
|
|
|
else if (!strcmp("SYNCEND", tok1))
|
|
|
|
{
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok3)
|
2006-03-15 09:41:48 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok3, &endptr, 0);
|
2006-03-15 09:41:48 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
/* do nothing, currently */
|
|
|
|
}
|
2006-03-16 16:27:59 +01:00
|
|
|
else if (!strcmp("HELLO", tok1))
|
|
|
|
{
|
2006-03-20 11:31:58 +01:00
|
|
|
if (!tok3)
|
2006-03-16 16:27:59 +01:00
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
flags = strtoul(tok3, &endptr, 0);
|
2006-03-16 16:27:59 +01:00
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
2006-03-22 17:20:55 +01:00
|
|
|
ui_seamless_begin(!!(flags & SEAMLESSRDP_HELLO_HIDDEN));
|
2006-03-16 16:27:59 +01:00
|
|
|
}
|
2006-03-20 13:36:14 +01:00
|
|
|
else if (!strcmp("ACK", tok1))
|
|
|
|
{
|
|
|
|
unsigned int serial;
|
|
|
|
|
|
|
|
serial = strtoul(tok3, &endptr, 0);
|
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_ack(serial);
|
|
|
|
}
|
2006-03-22 17:20:55 +01:00
|
|
|
else if (!strcmp("HIDE", tok1))
|
|
|
|
{
|
|
|
|
if (!tok3)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
flags = strtoul(tok3, &endptr, 0);
|
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_hide_desktop();
|
|
|
|
}
|
|
|
|
else if (!strcmp("UNHIDE", tok1))
|
|
|
|
{
|
|
|
|
if (!tok3)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
flags = strtoul(tok3, &endptr, 0);
|
|
|
|
if (*endptr)
|
|
|
|
return False;
|
|
|
|
|
|
|
|
ui_seamless_unhide_desktop();
|
|
|
|
}
|
2006-03-15 09:41:48 +01:00
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
|
|
|
|
xfree(l);
|
|
|
|
return True;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-01-08 05:47:06 +01:00
|
|
|
static RD_BOOL
|
2006-03-10 09:50:43 +01:00
|
|
|
seamless_line_handler(const char *line, void *data)
|
|
|
|
{
|
|
|
|
if (!seamless_process_line(line, data))
|
|
|
|
{
|
|
|
|
warning("SeamlessRDP: Invalid request:%s\n", line);
|
|
|
|
}
|
|
|
|
return True;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
seamless_process(STREAM s)
|
|
|
|
{
|
|
|
|
unsigned int pkglen;
|
|
|
|
static char *rest = NULL;
|
|
|
|
char *buf;
|
|
|
|
|
|
|
|
pkglen = s->end - s->p;
|
|
|
|
/* str_handle_lines requires null terminated strings */
|
|
|
|
buf = xmalloc(pkglen + 1);
|
|
|
|
STRNCPY(buf, (char *) s->p, pkglen + 1);
|
|
|
|
#if 0
|
|
|
|
printf("seamless recv:\n");
|
|
|
|
hexdump(s->p, pkglen);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
str_handle_lines(buf, &rest, seamless_line_handler, NULL);
|
|
|
|
|
|
|
|
xfree(buf);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-01-08 05:47:06 +01:00
|
|
|
RD_BOOL
|
2006-03-10 09:50:43 +01:00
|
|
|
seamless_init(void)
|
|
|
|
{
|
2006-03-16 16:27:59 +01:00
|
|
|
if (!g_seamless_rdp)
|
|
|
|
return False;
|
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
seamless_serial = 0;
|
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
seamless_channel =
|
|
|
|
channel_register("seamrdp", CHANNEL_OPTION_INITIALIZED | CHANNEL_OPTION_ENCRYPT_RDP,
|
|
|
|
seamless_process);
|
|
|
|
return (seamless_channel != NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
static unsigned int
|
2006-03-20 11:31:58 +01:00
|
|
|
seamless_send(const char *command, const char *format, ...)
|
2006-03-10 09:50:43 +01:00
|
|
|
{
|
|
|
|
STREAM s;
|
|
|
|
size_t len;
|
2006-03-10 16:19:52 +01:00
|
|
|
va_list argp;
|
2006-03-20 11:31:58 +01:00
|
|
|
char buf[1025];
|
|
|
|
|
|
|
|
len = snprintf(buf, sizeof(buf) - 1, "%s,%u,", command, seamless_serial);
|
|
|
|
|
|
|
|
assert(len < (sizeof(buf) - 1));
|
2006-03-10 16:19:52 +01:00
|
|
|
|
|
|
|
va_start(argp, format);
|
2006-03-20 11:31:58 +01:00
|
|
|
len += vsnprintf(buf + len, sizeof(buf) - len - 1, format, argp);
|
2006-03-10 16:19:52 +01:00
|
|
|
va_end(argp);
|
2006-03-10 09:50:43 +01:00
|
|
|
|
2006-03-20 11:31:58 +01:00
|
|
|
assert(len < (sizeof(buf) - 1));
|
|
|
|
|
|
|
|
buf[len] = '\n';
|
|
|
|
buf[len + 1] = '\0';
|
|
|
|
|
2006-03-20 13:00:09 +01:00
|
|
|
len++;
|
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
s = channel_init(seamless_channel, len);
|
2006-03-10 16:19:52 +01:00
|
|
|
out_uint8p(s, buf, len) s_mark_end(s);
|
2006-03-10 09:50:43 +01:00
|
|
|
|
2006-03-13 16:04:51 +01:00
|
|
|
DEBUG_SEAMLESS(("SeamlessRDP sending:%s", buf));
|
|
|
|
|
2006-03-10 09:50:43 +01:00
|
|
|
#if 0
|
|
|
|
printf("seamless send:\n");
|
|
|
|
hexdump(s->channel_hdr + 8, s->end - s->channel_hdr - 8);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
channel_send(s, seamless_channel);
|
2006-03-20 13:36:14 +01:00
|
|
|
|
|
|
|
return seamless_serial++;
|
2006-03-10 09:50:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
unsigned int
|
2006-03-10 09:50:43 +01:00
|
|
|
seamless_send_sync()
|
|
|
|
{
|
2006-03-16 16:27:59 +01:00
|
|
|
if (!g_seamless_rdp)
|
2006-03-20 13:36:14 +01:00
|
|
|
return (unsigned int) -1;
|
2006-03-16 16:27:59 +01:00
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
return seamless_send("SYNC", "");
|
2006-03-10 09:50:43 +01:00
|
|
|
}
|
2006-03-10 16:19:52 +01:00
|
|
|
|
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
unsigned int
|
2006-03-10 16:19:52 +01:00
|
|
|
seamless_send_state(unsigned long id, unsigned int state, unsigned long flags)
|
|
|
|
{
|
2006-03-16 16:27:59 +01:00
|
|
|
if (!g_seamless_rdp)
|
2006-03-20 13:36:14 +01:00
|
|
|
return (unsigned int) -1;
|
2006-03-16 16:27:59 +01:00
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
return seamless_send("STATE", "0x%08lx,0x%x,0x%lx", id, state, flags);
|
2006-03-10 16:19:52 +01:00
|
|
|
}
|
2006-03-17 09:52:29 +01:00
|
|
|
|
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
unsigned int
|
2006-03-17 13:39:09 +01:00
|
|
|
seamless_send_position(unsigned long id, int x, int y, int width, int height, unsigned long flags)
|
|
|
|
{
|
2006-03-20 13:36:14 +01:00
|
|
|
return seamless_send("POSITION", "0x%08lx,%d,%d,%d,%d,0x%lx", id, x, y, width, height,
|
|
|
|
flags);
|
2006-03-17 13:39:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Update select timeout */
|
|
|
|
void
|
|
|
|
seamless_select_timeout(struct timeval *tv)
|
|
|
|
{
|
|
|
|
struct timeval ourtimeout = { 0, SEAMLESSRDP_POSITION_TIMER };
|
|
|
|
|
|
|
|
if (g_seamless_rdp)
|
|
|
|
{
|
|
|
|
if (timercmp(&ourtimeout, tv, <))
|
|
|
|
{
|
|
|
|
tv->tv_sec = ourtimeout.tv_sec;
|
|
|
|
tv->tv_usec = ourtimeout.tv_usec;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-03-20 16:43:15 +01:00
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
unsigned int
|
2006-03-17 09:52:29 +01:00
|
|
|
seamless_send_zchange(unsigned long id, unsigned long below, unsigned long flags)
|
|
|
|
{
|
|
|
|
if (!g_seamless_rdp)
|
2006-03-20 13:36:14 +01:00
|
|
|
return (unsigned int) -1;
|
2006-03-17 09:52:29 +01:00
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
return seamless_send("ZCHANGE", "0x%08lx,0x%08lx,0x%lx", id, below, flags);
|
2006-03-17 09:52:29 +01:00
|
|
|
}
|
2006-03-17 10:56:20 +01:00
|
|
|
|
|
|
|
|
2006-03-20 16:43:15 +01:00
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
unsigned int
|
2006-03-17 10:56:20 +01:00
|
|
|
seamless_send_focus(unsigned long id, unsigned long flags)
|
|
|
|
{
|
|
|
|
if (!g_seamless_rdp)
|
2006-03-20 13:36:14 +01:00
|
|
|
return (unsigned int) -1;
|
2006-03-17 10:56:20 +01:00
|
|
|
|
2006-03-20 13:36:14 +01:00
|
|
|
return seamless_send("FOCUS", "0x%08lx,0x%lx", id, flags);
|
2006-03-17 10:56:20 +01:00
|
|
|
}
|