Switch back to using XftDraw so that we take advantage of the

Fri Aug  2 00:43:15 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkgc-x11.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkpixmap-x11.c
	gdk/x11/gdkprivate-x11.h gdk/x11/gdkwindow-x11.c:
	Switch back to using XftDraw so that we take
	advantage of the draw-to-non-RENDER capabilities
	of Xft2.

	* demos/gtk-demo/changedisplay.c (query_for_toplevel):
	Fix the case where the user clicks on the "click on
	a window popup".
This commit is contained in:
Owen Taylor
2002-08-02 04:57:53 +00:00
committed by Owen Taylor
parent 63489392e6
commit d5f0576cf4
14 changed files with 189 additions and 48 deletions

View File

@ -818,7 +818,7 @@ Picture
_gdk_x11_gc_get_fg_picture (GdkGC *gc)
{
GdkGCX11 *x11_gc;
GdkColormap *cmap = gdk_gc_get_colormap (gc);
GdkColormap *cmap;
gboolean new = FALSE;
GdkColor color;
@ -828,6 +828,7 @@ _gdk_x11_gc_get_fg_picture (GdkGC *gc)
return None;
x11_gc = GDK_GC_X11 (gc);
cmap = gdk_gc_get_colormap (gc);
if (x11_gc->fg_picture == None)
{
@ -870,4 +871,34 @@ _gdk_x11_gc_get_fg_picture (GdkGC *gc)
return x11_gc->fg_picture;
}
/**
* _gdk_gc_x11_get_fg_xft_color:
* @gc: a #GdkGC
* @xftcolor: location to store the color
*
* Gets the foreground color of the GC as a XftColor.
**/
void
_gdk_gc_x11_get_fg_xft_color (GdkGC *gc,
XftColor *xftcolor)
{
GdkGCX11 *x11_gc;
GdkColormap *cmap;
GdkColor color;
g_return_if_fail (GDK_IS_GC_X11 (gc));
x11_gc = GDK_GC_X11 (gc);
cmap = gdk_gc_get_colormap (gc);
xftcolor->pixel = x11_gc->fg_pixel;
gdk_colormap_query_color (cmap, xftcolor->pixel, &color);
xftcolor->color.red = color.red;
xftcolor->color.green = color.green;
xftcolor->color.blue = color.blue;
xftcolor->color.alpha = 0xffff;
}
#endif /* HAVE_XFT */