Document the new seamless protocol command PERSISTENT
and implement the usage of the new command in rdesktop. If a seamless command is specified the persistent mode of the session will be changed to non-persistent. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1822 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
2ceb56e0d4
commit
46a3684c27
@ -294,6 +294,22 @@ For each window, the server will send CREATE, POSITION and STATE, in that
|
||||
order, just as if the window was created. Note that a TITLE may also,
|
||||
optionally, be sent before the STATE.
|
||||
|
||||
PERSISTENT
|
||||
----------
|
||||
|
||||
Change persistent mode for the session.
|
||||
|
||||
Syntax:
|
||||
PERSISTENT,<SERIAL>,<ENABLE>
|
||||
|
||||
A seamless session always starts in persistent mode. This means that
|
||||
the session will not terminate if all applications is closed.
|
||||
Upon re-connection to a session, the session will reset to persistent
|
||||
mode and client needs to change this if non persistent mode is wanted.
|
||||
If a persistent session not have any application running and is in
|
||||
disconnected state, it will terminate after a timeout is reached that
|
||||
matches the lifetime of the re-connection cookie.
|
||||
|
||||
POSITION
|
||||
--------
|
||||
|
||||
|
1
proto.h
1
proto.h
@ -346,6 +346,7 @@ unsigned int seamless_send_zchange(unsigned long id, unsigned long below, unsign
|
||||
unsigned int seamless_send_focus(unsigned long id, unsigned long flags);
|
||||
unsigned int seamless_send_destroy(unsigned long id);
|
||||
unsigned int seamless_send_spawn(char *cmd);
|
||||
unsigned int seamless_send_persistent(RD_BOOL);
|
||||
|
||||
/* scard.c */
|
||||
void scard_lock(int lock);
|
||||
|
@ -109,6 +109,7 @@ RD_BOOL g_seamless_rdp = False;
|
||||
RD_BOOL g_use_password_as_pin = False;
|
||||
char g_seamless_shell[512];
|
||||
char g_seamless_spawn_cmd[512];
|
||||
RD_BOOL g_seamless_persistent_mode = True;
|
||||
RD_BOOL g_user_quit = False;
|
||||
uint32 g_embed_wnd;
|
||||
uint32 g_rdp5_performanceflags =
|
||||
@ -614,6 +615,7 @@ main(int argc, char *argv[])
|
||||
|
||||
case 's':
|
||||
STRNCPY(shell, optarg, sizeof(shell));
|
||||
g_seamless_persistent_mode = False;
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
|
14
seamless.c
14
seamless.c
@ -3,7 +3,7 @@
|
||||
Seamless Windows support
|
||||
Copyright 2005-2008 Peter Astrand <astrand@cendio.se> for Cendio AB
|
||||
Copyright 2007-2008 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
||||
Copyright 2013 Henrik Andersson <hean01@cendio.se> for Cendio AB
|
||||
Copyright 2013-2014 Henrik Andersson <hean01@cendio.se> for Cendio AB
|
||||
|
||||
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
|
||||
@ -542,3 +542,15 @@ seamless_send_spawn(char *cmdline)
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
seamless_send_persistent(RD_BOOL enable)
|
||||
{
|
||||
unsigned int res;
|
||||
if (!g_seamless_rdp)
|
||||
return (unsigned int) -1;
|
||||
printf("%s persitent seamless mode.\n", enable?"Enable":"Disable");
|
||||
res = seamless_send("PERSISTENT", "%d", enable);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
3
xwin.c
3
xwin.c
@ -95,6 +95,7 @@ static RD_BOOL g_seamless_active = False; /* We are currently in seamless mode *
|
||||
static RD_BOOL g_seamless_hidden = False; /* Desktop is hidden on server */
|
||||
static RD_BOOL g_seamless_broken_restack = False; /* WM does not properly restack */
|
||||
extern RD_BOOL g_seamless_rdp;
|
||||
extern RD_BOOL g_seamless_persistent_mode;
|
||||
|
||||
extern uint32 g_embed_wnd;
|
||||
RD_BOOL g_enable_compose = False;
|
||||
@ -3827,6 +3828,8 @@ ui_seamless_begin(RD_BOOL hidden)
|
||||
seamless_send_spawn(g_seamless_spawn_cmd);
|
||||
g_seamless_spawn_cmd[0] = 0;
|
||||
}
|
||||
|
||||
seamless_send_persistent(g_seamless_persistent_mode);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user