mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-24 12:21:34 +00:00
* Source/x11/XGServer.m (getForScreen:pixelFormat:masks:::):
removed unused code.
This commit is contained in:
parent
c1ab242c9e
commit
8b66164d88
1 changed files with 0 additions and 30 deletions
|
@ -621,42 +621,12 @@ static int byte_order(void)
|
||||||
Visual *visual;
|
Visual *visual;
|
||||||
XImage *i;
|
XImage *i;
|
||||||
int bpp;
|
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;
|
RContext *context;
|
||||||
|
|
||||||
// Better to get the used visual from the context.
|
// Better to get the used visual from the context.
|
||||||
context = [self screenRContext];
|
context = [self screenRContext];
|
||||||
visual = context->visual;
|
visual = context->visual;
|
||||||
bpp = context->depth;
|
bpp = context->depth;
|
||||||
// #endif
|
|
||||||
|
|
||||||
i = XCreateImage(dpy, visual, bpp, ZPixmap, 0, NULL, 8, 8, 8, 0);
|
i = XCreateImage(dpy, visual, bpp, ZPixmap, 0, NULL, 8, 8, 8, 0);
|
||||||
bpp = i->bits_per_pixel;
|
bpp = i->bits_per_pixel;
|
||||||
|
|
Loading…
Reference in a new issue