--- sourceforge.net/trunk/rdesktop/xwin.c 2004/08/23 11:28:23 754 +++ sourceforge.net/trunk/rdesktop/xwin.c 2004/11/18 11:18:49 800 @@ -30,6 +30,8 @@ extern int g_width; extern int g_height; +extern int g_xpos; +extern int g_ypos; extern BOOL g_sendmotion; extern BOOL g_fullscreen; extern BOOL g_grab_keyboard; @@ -946,7 +948,8 @@ ui_create_window(void) { uint8 null_pointer_mask[1] = { 0x80 }; - uint8 null_pointer_data[4] = { 0x00, 0x00, 0x00, 0x00 }; + uint8 null_pointer_data[24] = { 0x00 }; + XSetWindowAttributes attribs; XClassHint *classhints; XSizeHints *sizehints; @@ -963,7 +966,7 @@ attribs.override_redirect = g_fullscreen; attribs.colormap = g_xcolmap; - g_wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), 0, 0, wndwidth, wndheight, + g_wnd = XCreateWindow(g_display, RootWindowOfScreen(g_screen), g_xpos, g_ypos, wndwidth, wndheight, 0, g_depth, InputOutput, g_visual, CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap | CWBorderPixel, &attribs); @@ -1434,12 +1437,9 @@ error("select: %s\n", strerror(errno)); case 0: - /* TODO: if tv.tv_sec just times out - * we will segfault. - * FIXME: - */ - //s_timeout = True; - //rdpdr_check_fds(&rfds, &wfds, (BOOL) True); + /* Abort serial read calls */ + if (s_timeout) + rdpdr_check_fds(&rfds, &wfds, (BOOL) True); continue; }