From 0e2925d0b8907ca6a005ba7fe6b64103d6e39829 Mon Sep 17 00:00:00 2001 From: David FORT Date: Thu, 7 May 2015 14:36:07 +0200 Subject: [PATCH] Fix remoteApps The assert that have been removed were preventing RAIL from working when you have an intermediary screen before seeing the application. --- client/X11/xf_client.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/client/X11/xf_client.c b/client/X11/xf_client.c index 8db672699..4338842b6 100644 --- a/client/X11/xf_client.c +++ b/client/X11/xf_client.c @@ -589,23 +589,22 @@ BOOL xf_create_window(xfContext* xfc) XFreeModifiermap(xfc->modifierMap); xfc->modifierMap = XGetModifierMapping(xfc->display); - assert(!xfc->gc); - xfc->gc = XCreateGC(xfc->display, xfc->drawable, GCGraphicsExposures, &gcv); - assert(!xfc->primary); - xfc->primary = XCreatePixmap(xfc->display, xfc->drawable, xfc->sessionWidth, xfc->sessionHeight, xfc->depth); + if (!xfc->gc); + xfc->gc = XCreateGC(xfc->display, xfc->drawable, GCGraphicsExposures, &gcv); + if (!xfc->primary); + xfc->primary = XCreatePixmap(xfc->display, xfc->drawable, xfc->sessionWidth, xfc->sessionHeight, xfc->depth); xfc->drawing = xfc->primary; - assert(!xfc->bitmap_mono); - xfc->bitmap_mono = XCreatePixmap(xfc->display, xfc->drawable, 8, 8, 1); - assert(!xfc->gc_mono); - xfc->gc_mono = XCreateGC(xfc->display, xfc->bitmap_mono, GCGraphicsExposures, &gcv); + if (!xfc->bitmap_mono); + xfc->bitmap_mono = XCreatePixmap(xfc->display, xfc->drawable, 8, 8, 1); + if (!xfc->gc_mono); + xfc->gc_mono = XCreateGC(xfc->display, xfc->bitmap_mono, GCGraphicsExposures, &gcv); XSetFunction(xfc->display, xfc->gc, GXcopy); XSetFillStyle(xfc->display, xfc->gc, FillSolid); XSetForeground(xfc->display, xfc->gc, BlackPixelOfScreen(xfc->screen)); XFillRectangle(xfc->display, xfc->primary, xfc->gc, 0, 0, xfc->sessionWidth, xfc->sessionHeight); XFlush(xfc->display); - assert(!xfc->image); - - xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0, + if (!xfc->image); + xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0, (char*) xfc->primary_buffer, xfc->sessionWidth, xfc->sessionHeight, xfc->scanline_pad, 0); return TRUE;