Fixed cleanup of xfc->drawable.
This commit is contained in:
parent
50c7777bbb
commit
1b9da01612
@ -645,12 +645,6 @@ BOOL xf_create_window(xfContext* xfc)
|
||||
|
||||
static void xf_window_free(xfContext* xfc)
|
||||
{
|
||||
if (xfc->gc_mono)
|
||||
{
|
||||
XFreeGC(xfc->display, xfc->gc_mono);
|
||||
xfc->gc_mono = 0;
|
||||
}
|
||||
|
||||
if (xfc->window)
|
||||
{
|
||||
xf_DestroyDesktopWindow(xfc, xfc->window);
|
||||
@ -682,6 +676,12 @@ static void xf_window_free(xfContext* xfc)
|
||||
xfc->bitmap_mono = 0;
|
||||
}
|
||||
|
||||
if (xfc->gc_mono)
|
||||
{
|
||||
XFreeGC(xfc->display, xfc->gc_mono);
|
||||
xfc->gc_mono = 0;
|
||||
}
|
||||
|
||||
if (xfc->primary)
|
||||
{
|
||||
XFreePixmap(xfc->display, xfc->primary);
|
||||
@ -1312,6 +1312,11 @@ static void xf_post_disconnect(freerdp* instance)
|
||||
xfc->xfDisp = NULL;
|
||||
}
|
||||
|
||||
if (xfc->drawable == xfc->window->handle)
|
||||
xfc->drawable = NULL;
|
||||
else
|
||||
xf_DestroyDummyWindow(xfc, xfc->drawable);
|
||||
|
||||
xf_window_free(xfc);
|
||||
xf_keyboard_free(xfc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user