x11display->dpy reset workaround