mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +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;
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue