--- sourceforge.net/branches/seamlessrdp-branch/rdesktop/xwin.c 2006/03/16 08:41:53 1143 +++ sourceforge.net/branches/seamlessrdp-branch/rdesktop/xwin.c 2006/03/16 10:14:18 1144 @@ -55,7 +55,6 @@ Window wnd; unsigned long id; unsigned long parent; - XWMHints *hints; int xoffset, yoffset; int width, height; int state; /* normal/minimized/maximized. */ @@ -295,7 +294,6 @@ if (sw == win) { *prevnext = sw->next; - XFree(sw->hints); xfree(sw); return; } @@ -3114,8 +3112,6 @@ sw->wnd = wnd; sw->id = id; sw->parent = parent; - sw->hints = XAllocWMHints(); - sw->hints->flags = 0; sw->xoffset = 0; sw->yoffset = 0; sw->width = 0; @@ -3230,9 +3226,12 @@ XIconifyWindow is easier. */ if (sw->state == SEAMLESSRDP_NOTYETMAPPED) { - sw->hints->flags |= StateHint; - sw->hints->initial_state = IconicState; - XSetWMHints(g_display, sw->wnd, sw->hints); + XWMHints *hints; + hints = XAllocWMHints(); + hints->flags = StateHint; + hints->initial_state = IconicState; + XSetWMHints(g_display, sw->wnd, hints); + XFree(hints); XMapWindow(g_display, sw->wnd); } else