--- rdesktop/xwin.c 2003-10-29 15:13:59.000000000 +0100 +++ rdesktop.mine/xwin.c 2003-11-06 09:03:31.000000000 +0100 @@ -27,6 +27,7 @@ extern int g_width; extern int g_height; +extern int g_nXPos, g_nYPos; extern BOOL g_sendmotion; extern BOOL g_fullscreen; extern BOOL g_grab_keyboard; @@ -839,7 +840,7 @@ attribs.backing_store = g_ownbackstore ? NotUseful : Always; attribs.override_redirect = g_fullscreen; - g_wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), 0, 0, wndwidth, wndheight, + g_wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), g_nXPos, g_nYPos, wndwidth, wndheight, 0, CopyFromParent, InputOutput, CopyFromParent, CWBackPixel | CWBackingStore | CWOverrideRedirect, &attribs); @@ -859,7 +860,9 @@ sizehints = XAllocSizeHints(); if (sizehints) { - sizehints->flags = PMinSize | PMaxSize; + sizehints->flags = PPosition | PSize | PMinSize | PMaxSize; + sizehints->x = g_nXPos; + sizehints->y = g_nYPos; sizehints->min_width = sizehints->max_width = g_width; sizehints->min_height = sizehints->max_height = g_height; XSetWMNormalHints(g_display, g_wnd, sizehints); --- rdesktop/rdesktop.c 2003-10-29 15:13:59.000000000 +0100 +++ rdesktop.mine/rdesktop.c 2003-11-06 08:58:39.000000000 +0100 @@ -52,6 +52,7 @@ absolute value specifies the percent of the whole screen. */ int g_height = 600; +int g_nXPos = 0, g_nYPos = 0; int tcp_port_rdp = TCP_PORT_RDP; int g_server_bpp = 8; int g_win_button_size = 0; /* If zero, disable single app mode */ @@ -303,7 +304,13 @@ } if (*p == 'x') - g_height = strtol(p + 1, NULL, 10); + g_height = strtol(p + 1, &p, 10); + + if ( *p == '+' || *p == '-' ) + g_nXPos = strtol ( p, &p, 10 ); + + if ( *p == '+' || *p == '-' ) + g_nYPos = strtol ( p, NULL, 10 ); if (g_height <= 0) {