couple of cosmetic tweaks from resolving my local patch with the bugzilla

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

	* src/frame.c, src/theme.c: couple of cosmetic tweaks from
	resolving my local patch with the bugzilla patch from the 8-19
	entry below
This commit is contained in:
Havoc Pennington 2004-08-27 02:24:48 +00:00 committed by Havoc Pennington
parent 1f7f29e059
commit a8fd516aa0
3 changed files with 65 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-08-26 Havoc Pennington <hp@redhat.com>
* src/frame.c, src/theme.c: couple of cosmetic tweaks from
resolving my local patch with the bugzilla patch from the 8-19
entry below
2004-08-26 Havoc Pennington <hp@redhat.com>
* configure.in: move the have_xrender variable initialization up

View File

@ -26,8 +26,6 @@
#include "errors.h"
#include "keybindings.h"
#include <X11/extensions/Xrender.h>
#ifdef HAVE_RENDER
#include <X11/extensions/Xrender.h>
#endif
@ -95,6 +93,61 @@ 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)
{

View File

@ -2663,7 +2663,10 @@ get_gc_for_primitive (GtkWidget *widget,
meta_color_spec_render (color_spec, widget, &color);
values.foreground = color;
gdk_rgb_find_color (gdk_drawable_get_colormap (drawable), &values.foreground);
gdk_rgb_find_color (gdk_drawable_get_colormap (drawable),
&values.foreground);
values.line_width = line_width;
gc = gdk_gc_new_with_values (drawable, &values,