delete extra copy of find_argb_visual so things compile

2004-08-26  Havoc Pennington  <hp@redhat.com>

	* src/frame.c: delete extra copy of find_argb_visual so things
	compile

	* src/compositor.c (HAS_NAME_WINDOW_PIXMAP): copy the
	XCompositeNameWindowPixmap() stuff from xcompmgr, though I can't
	say I really know what it's supposed to help with (painting the
	window border?)
This commit is contained in:
Havoc Pennington
2004-08-27 03:27:43 +00:00
committed by Havoc Pennington
parent a8fd516aa0
commit b682a9f945
3 changed files with 96 additions and 73 deletions

View File

@ -93,61 +93,6 @@ find_argb_visual (MetaDisplay *display,
#endif /* !RENDER */
}
static Visual*
find_argb_visual (MetaDisplay *display,
int scr)
{
#ifdef HAVE_RENDER
XVisualInfo *xvi;
XVisualInfo template;
int nvi;
int i;
XRenderPictFormat *format;
Visual *visual;
if (!META_DISPLAY_HAS_RENDER (display))
return NULL;
template.screen = scr;
template.depth = 32;
template.class = TrueColor;
xvi = XGetVisualInfo (display->xdisplay,
VisualScreenMask |
VisualDepthMask |
VisualClassMask,
&template,
&nvi);
if (!xvi)
return 0;
visual = NULL;
for (i = 0; i < nvi; i++)
{
format = XRenderFindVisualFormat (display->xdisplay, xvi[i].visual);
if (format->type == PictTypeDirect && format->direct.alphaMask)
{
visual = xvi[i].visual;
break;
}
}
XFree (xvi);
if (visual)
meta_topic (META_DEBUG_COMPOSITOR,
"Found ARGB visual 0x%lx\n",
(long) visual->visualid);
else
meta_topic (META_DEBUG_COMPOSITOR,
"No ARGB visual found\n");
return visual;
#else /* RENDER */
return NULL;
#endif /* !RENDER */
}
void
meta_window_ensure_frame (MetaWindow *window)
{