* Source/x11/XGServer.m (getForScreen:pixelFormat:masks:::):

removed unused code.
This commit is contained in:
Sergii Stoian 2020-02-03 13:31:27 +02:00
parent c1ab242c9e
commit 8b66164d88

View file

@ -621,42 +621,12 @@ static int byte_order(void)
Visual *visual;
XImage *i;
int bpp;
// #if 0
// XVisualInfo template;
// XVisualInfo *visualInfo;
// int numMatches;
// /*
// We need a visual that we can generate pixel values for by ourselves.
// Thus, we try to find a DirectColor or TrueColor visual. If that fails,
// we use the default visual and hope that it's usable.
// */
// template.class = DirectColor;
// visualInfo = XGetVisualInfo(dpy, VisualClassMask, &template, &numMatches);
// if (!visualInfo)
// {
// template.class = TrueColor;
// visualInfo = XGetVisualInfo(dpy, VisualClassMask, &template, &numMatches);
// }
// if (visualInfo)
// {
// visual = visualInfo->visual;
// bpp = visualInfo->depth;
// XFree(visualInfo);
// }
// else
// {
// visual = DefaultVisual(dpy, DefaultScreen(dpy));
// bpp = DefaultDepth(dpy, DefaultScreen(dpy));
// }
// #else
RContext *context;
// Better to get the used visual from the context.
context = [self screenRContext];
visual = context->visual;
bpp = context->depth;
// #endif
i = XCreateImage(dpy, visual, bpp, ZPixmap, 0, NULL, 8, 8, 8, 0);
bpp = i->bits_per_pixel;