Support for the new HIDE/UNHIDE commands.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/branches/seamlessrdp-branch/rdesktop@1192 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
a75c18a3fc
commit
5b1de10ffc
@ -421,3 +421,6 @@ enum RDP_INPUT_DEVICE
|
||||
#define SEAMLESSRDP_POSITION_TIMER 200000
|
||||
|
||||
#define SEAMLESSRDP_CREATE_MODAL 0x0001
|
||||
|
||||
#define SEAMLESSRDP_HELLO_RECONNECT 0x0001
|
||||
#define SEAMLESSRDP_HELLO_HIDDEN 0x0002
|
||||
|
4
proto.h
4
proto.h
@ -272,7 +272,9 @@ 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);
|
||||
void ui_begin_update(void);
|
||||
void ui_end_update(void);
|
||||
void ui_seamless_begin(void);
|
||||
void ui_seamless_begin(BOOL hidden);
|
||||
void ui_seamless_hide_desktop(void);
|
||||
void ui_seamless_unhide_desktop(void);
|
||||
void ui_seamless_toggle(void);
|
||||
void ui_seamless_create_window(unsigned long id, unsigned long group, unsigned long parent,
|
||||
unsigned long flags);
|
||||
|
24
seamless.c
24
seamless.c
@ -244,7 +244,7 @@ seamless_process_line(const char *line, void *data)
|
||||
if (*endptr)
|
||||
return False;
|
||||
|
||||
ui_seamless_begin();
|
||||
ui_seamless_begin(!!(flags & SEAMLESSRDP_HELLO_HIDDEN));
|
||||
}
|
||||
else if (!strcmp("ACK", tok1))
|
||||
{
|
||||
@ -256,6 +256,28 @@ seamless_process_line(const char *line, void *data)
|
||||
|
||||
ui_seamless_ack(serial);
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
xfree(l);
|
||||
|
40
xwin.c
40
xwin.c
@ -82,6 +82,7 @@ static seamless_window *g_seamless_windows = NULL;
|
||||
static unsigned long g_seamless_focused = 0;
|
||||
static BOOL g_seamless_started = False; /* Server end is up and running */
|
||||
static BOOL g_seamless_active = False; /* We are currently in seamless mode */
|
||||
static BOOL g_seamless_hidden = False; /* Desktop is hidden on server */
|
||||
extern BOOL g_seamless_rdp;
|
||||
|
||||
extern uint32 g_embed_wnd;
|
||||
@ -3244,7 +3245,7 @@ ui_end_update(void)
|
||||
|
||||
|
||||
void
|
||||
ui_seamless_begin()
|
||||
ui_seamless_begin(BOOL hidden)
|
||||
{
|
||||
if (!g_seamless_rdp)
|
||||
return;
|
||||
@ -3253,6 +3254,40 @@ ui_seamless_begin()
|
||||
return;
|
||||
|
||||
g_seamless_started = True;
|
||||
g_seamless_hidden = hidden;
|
||||
|
||||
if (!hidden)
|
||||
ui_seamless_toggle();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ui_seamless_hide_desktop()
|
||||
{
|
||||
if (!g_seamless_rdp)
|
||||
return;
|
||||
|
||||
if (!g_seamless_started)
|
||||
return;
|
||||
|
||||
if (g_seamless_active)
|
||||
ui_seamless_toggle();
|
||||
|
||||
g_seamless_hidden = True;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ui_seamless_unhide_desktop()
|
||||
{
|
||||
if (!g_seamless_rdp)
|
||||
return;
|
||||
|
||||
if (!g_seamless_started)
|
||||
return;
|
||||
|
||||
g_seamless_hidden = False;
|
||||
|
||||
ui_seamless_toggle();
|
||||
}
|
||||
|
||||
@ -3266,6 +3301,9 @@ ui_seamless_toggle()
|
||||
if (!g_seamless_started)
|
||||
return;
|
||||
|
||||
if (g_seamless_hidden)
|
||||
return;
|
||||
|
||||
if (g_seamless_active)
|
||||
{
|
||||
/* Deactivate */
|
||||
|
Loading…
Reference in New Issue
Block a user