diff --git a/constants.h b/constants.h index 3821443..12716fd 100644 --- a/constants.h +++ b/constants.h @@ -243,6 +243,14 @@ enum RDP_INPUT_DEVICE #define RDP_LOGON_BLOB 0x0100 #define RDP_LOGON_LEAVE_AUDIO 0x2000 +#define RDP5_DISABLE_NOTHING 0x00 +#define RDP5_NO_WALLPAPER 0x01 +#define RDP5_NO_FULLWINDOWDRAG 0x02 +#define RDP5_NO_MENUANIMATIONS 0x04 +#define RDP5_NO_THEMING 0x08 +#define RDP5_NO_CURSOR_SHADOW 0x20 +#define RDP5_NO_CURSORSETTINGS 0x40 /* disables cursor blinking */ + /* Keymap flags */ #define MapRightShiftMask (1<<0) #define MapLeftShiftMask (1<<1) diff --git a/doc/rdesktop.1 b/doc/rdesktop.1 index 0148e02..b33265d 100644 --- a/doc/rdesktop.1 +++ b/doc/rdesktop.1 @@ -107,6 +107,15 @@ More than 8 bpp are only supported when connecting to Windows XP (up to 16 bpp) or newer. Note that the colour depth may also be limited by the server configuration. .TP +.BR "-x " +Alters default bandwith performance behaviour for RDP5. By default only +theming is enabled, and all other options are disabled (corresponding +to modem (56 Kbps)). Setting experience to b[roadband] enables menu +animations and full window dragging. Setting experience to l[an] will +also enable the desktop wallpaper. Setting experience to m[odem] +disables all (including theming). Experience can also be a hexidecimal +number containing the flags. +.TP .BR "-r " Enable redirection of the specified device on the client, such that it appears on the server. Note that the allowed diff --git a/rdesktop.c b/rdesktop.c index 1d9a7e5..2e928f4 100644 --- a/rdesktop.c +++ b/rdesktop.c @@ -71,6 +71,7 @@ BOOL g_numlock_sync = False; extern BOOL g_owncolmap; extern BOOL g_ownbackstore; extern uint32 g_embed_wnd; +uint32 g_rdp5_performanceflags = RDP5_NO_WALLPAPER | RDP5_NO_FULLWINDOWDRAG | RDP5_NO_MENUANIMATIONS; #ifdef WITH_RDPSND BOOL g_rdpsnd = False; @@ -121,6 +122,7 @@ usage(char *program) fprintf(stderr, " -N: enable numlock syncronization\n"); fprintf(stderr, " -X: embed into another window with a given id.\n"); fprintf(stderr, " -a: connection colour depth\n"); + fprintf(stderr, " -x: RDP5 experience (m[odem 28.8], b[roadband], l[an] or hex number)\n"); fprintf(stderr, " -r: enable specified device redirection (this flag can be repeated)\n"); fprintf(stderr, " '-r comport:COM1=/dev/ttyS0': enable serial redirection of /dev/ttyS0 to COM1\n"); @@ -257,7 +259,7 @@ main(int argc, char *argv[]) #define VNCOPT #endif - while ((c = getopt(argc, argv, VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:r:045h?")) != -1) + while ((c = getopt(argc, argv, VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:r:045h?")) != -1) { switch (c) { @@ -418,6 +420,26 @@ main(int argc, char *argv[]) } break; + case 'x': + + if (strncmp("modem", optarg, 1) == 0) + { + g_rdp5_performanceflags = RDP5_NO_WALLPAPER | RDP5_NO_FULLWINDOWDRAG | RDP5_NO_MENUANIMATIONS | RDP5_NO_THEMING; + } + else if (strncmp("broadband", optarg, 1) == 0) + { + g_rdp5_performanceflags = RDP5_NO_WALLPAPER; + } + else if (strncmp("lan", optarg, 1) == 0) + { + g_rdp5_performanceflags = RDP5_DISABLE_NOTHING; + } + else + { + g_rdp5_performanceflags = strtol(optarg, NULL, 16); + } + break; + case 'r': if (strncmp("sound", optarg, 5) == 0) diff --git a/rdp.c b/rdp.c index cfb32f0..4718591 100644 --- a/rdp.c +++ b/rdp.c @@ -29,6 +29,7 @@ extern BOOL g_encryption; extern BOOL g_desktop_save; extern BOOL g_use_rdp5; extern uint16 g_server_rdp_version; +extern uint32 g_rdp5_performanceflags; extern int g_server_bpp; uint8 *g_next_packet; @@ -297,7 +298,7 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user, out_uint32(s, 0); out_uint32_le(s, 0xffffffc4); out_uint32_le(s, 0xfffffffe); - out_uint32_le(s, 0x0f); + out_uint32_le(s, g_rdp5_performanceflags); out_uint32(s, 0);