--- sourceforge.net/trunk/rdesktop/xwin.c 2004/01/19 21:58:58 565 +++ sourceforge.net/trunk/rdesktop/xwin.c 2004/01/19 23:45:26 566 @@ -43,6 +43,7 @@ Window g_wnd; BOOL g_enable_compose = False; static GC g_gc; +static BOOL g_gc_initialized = False; static Visual *g_visual; static int g_depth; static int g_bpp; @@ -887,7 +888,11 @@ CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap | CWBorderPixel, &attribs); - g_gc = XCreateGC(g_display, g_wnd, 0, NULL); + if ( ! g_gc_initialized ) + { + g_gc = XCreateGC(g_display, g_wnd, 0, NULL); + g_gc_initialized = True; + } if ((g_ownbackstore) && (! g_backstore_initialized)) {