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:
parent
1f7f29e059
commit
a8fd516aa0
@ -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>
|
2004-08-26 Havoc Pennington <hp@redhat.com>
|
||||||
|
|
||||||
* configure.in: move the have_xrender variable initialization up
|
* configure.in: move the have_xrender variable initialization up
|
||||||
|
57
src/frame.c
57
src/frame.c
@ -26,8 +26,6 @@
|
|||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
#include "keybindings.h"
|
#include "keybindings.h"
|
||||||
|
|
||||||
#include <X11/extensions/Xrender.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_RENDER
|
#ifdef HAVE_RENDER
|
||||||
#include <X11/extensions/Xrender.h>
|
#include <X11/extensions/Xrender.h>
|
||||||
#endif
|
#endif
|
||||||
@ -95,6 +93,61 @@ find_argb_visual (MetaDisplay *display,
|
|||||||
#endif /* !RENDER */
|
#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
|
void
|
||||||
meta_window_ensure_frame (MetaWindow *window)
|
meta_window_ensure_frame (MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -2663,7 +2663,10 @@ get_gc_for_primitive (GtkWidget *widget,
|
|||||||
meta_color_spec_render (color_spec, widget, &color);
|
meta_color_spec_render (color_spec, widget, &color);
|
||||||
|
|
||||||
values.foreground = 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;
|
values.line_width = line_width;
|
||||||
|
|
||||||
gc = gdk_gc_new_with_values (drawable, &values,
|
gc = gdk_gc_new_with_values (drawable, &values,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user