Merge pull request #2604 from hardening/rail_fix

Fix remoteApps
This commit is contained in:
Norbert Federa 2015-05-07 18:11:38 +02:00
commit 525ae6c561

View File

@ -589,23 +589,22 @@ BOOL xf_create_window(xfContext* xfc)
XFreeModifiermap(xfc->modifierMap); XFreeModifiermap(xfc->modifierMap);
xfc->modifierMap = XGetModifierMapping(xfc->display); xfc->modifierMap = XGetModifierMapping(xfc->display);
assert(!xfc->gc); if (!xfc->gc);
xfc->gc = XCreateGC(xfc->display, xfc->drawable, GCGraphicsExposures, &gcv); xfc->gc = XCreateGC(xfc->display, xfc->drawable, GCGraphicsExposures, &gcv);
assert(!xfc->primary); if (!xfc->primary);
xfc->primary = XCreatePixmap(xfc->display, xfc->drawable, xfc->sessionWidth, xfc->sessionHeight, xfc->depth); xfc->primary = XCreatePixmap(xfc->display, xfc->drawable, xfc->sessionWidth, xfc->sessionHeight, xfc->depth);
xfc->drawing = xfc->primary; xfc->drawing = xfc->primary;
assert(!xfc->bitmap_mono); if (!xfc->bitmap_mono);
xfc->bitmap_mono = XCreatePixmap(xfc->display, xfc->drawable, 8, 8, 1); xfc->bitmap_mono = XCreatePixmap(xfc->display, xfc->drawable, 8, 8, 1);
assert(!xfc->gc_mono); if (!xfc->gc_mono);
xfc->gc_mono = XCreateGC(xfc->display, xfc->bitmap_mono, GCGraphicsExposures, &gcv); xfc->gc_mono = XCreateGC(xfc->display, xfc->bitmap_mono, GCGraphicsExposures, &gcv);
XSetFunction(xfc->display, xfc->gc, GXcopy); XSetFunction(xfc->display, xfc->gc, GXcopy);
XSetFillStyle(xfc->display, xfc->gc, FillSolid); XSetFillStyle(xfc->display, xfc->gc, FillSolid);
XSetForeground(xfc->display, xfc->gc, BlackPixelOfScreen(xfc->screen)); XSetForeground(xfc->display, xfc->gc, BlackPixelOfScreen(xfc->screen));
XFillRectangle(xfc->display, xfc->primary, xfc->gc, 0, 0, xfc->sessionWidth, xfc->sessionHeight); XFillRectangle(xfc->display, xfc->primary, xfc->gc, 0, 0, xfc->sessionWidth, xfc->sessionHeight);
XFlush(xfc->display); XFlush(xfc->display);
assert(!xfc->image); if (!xfc->image);
xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,
xfc->image = XCreateImage(xfc->display, xfc->visual, xfc->depth, ZPixmap, 0,
(char*) xfc->primary_buffer, xfc->sessionWidth, xfc->sessionHeight, xfc->scanline_pad, 0); (char*) xfc->primary_buffer, xfc->sessionWidth, xfc->sessionHeight, xfc->scanline_pad, 0);
return TRUE; return TRUE;