Sat Dec  2 13:06:18 CET 2006  Clemens Fruhwirth <clemens@endorphin.org>
  * XFT support for DE
diff -rN -u old-ion-3darcs/build/ac/configure.ac new-ion-3darcs/build/ac/configure.ac
--- old-ion-3darcs/build/ac/configure.ac	2006-12-02 13:37:17.344039750 +0100
+++ new-ion-3darcs/build/ac/configure.ac	2006-12-02 13:37:17.348040000 +0100
@@ -65,6 +65,8 @@
 
 if test "x$enable_xinerama" = xno; then
     _DCF_NO_XINERAMA="-DCF_NO_XINERAMA"
+else
+    _DCF_NO_XINERAMA="-DCF_XINERAMA"
 fi
 
 dnl }}}
@@ -427,6 +429,18 @@
 
 dnl }}}
 
+AC_ARG_ENABLE([xft],
+              [AS_HELP_STRING([--disable-xft],
+                              [Disable XFT Support])])
+
+if test "x$enable_xft" != xno; then
+	XFT_CFLAGS=`xft-config --cflags`
+        XFT_CFLAGS="${XFT_CFLAGS} -DXFT" 
+	XFT_LIBS=`xft-config --libs`
+fi
+
+AC_SUBST([XFT_CFLAGS])
+AC_SUBST([XFT_LIBS])
 
 AC_OUTPUT([system-ac.mk])
 
diff -rN -u old-ion-3darcs/build/ac/system-ac.mk.in new-ion-3darcs/build/ac/system-ac.mk.in
--- old-ion-3darcs/build/ac/system-ac.mk.in	2006-12-02 13:37:17.344039750 +0100
+++ new-ion-3darcs/build/ac/system-ac.mk.in	2006-12-02 13:37:17.348040000 +0100
@@ -188,3 +188,7 @@
 STRIP=@STRIP@
 
 RM=rm
+
+### XFT Support
+CFLAGS+=@XFT_CFLAGS@
+LIBS+=@XFT_LIBS@
diff -rN -u old-ion-3darcs/de/brush.c new-ion-3darcs/de/brush.c
--- old-ion-3darcs/de/brush.c	2006-12-02 13:37:17.344039750 +0100
+++ new-ion-3darcs/de/brush.c	2006-12-02 13:37:17.348040000 +0100
@@ -38,6 +38,9 @@
     brush->win=win;
     brush->clip_set=FALSE;
     
+#ifdef XFT
+    brush->draw=NULL;
+#endif /* XFT */
     style->usecount++;
 
     if(!grbrush_init(&(brush->grbrush))){
@@ -104,6 +107,10 @@
 {
     destyle_unref(brush->d);
     brush->d=NULL;
+#ifdef XFT
+    if(brush->draw!=NULL)
+	    XftDrawDestroy(brush->draw);
+#endif /* XFT */
     grbrush_deinit(&(brush->grbrush));
 }
 
@@ -114,6 +121,21 @@
 }
 
 
+#ifdef XFT
+XftDraw *debrush_get_draw(DEBrush *brush, Drawable d)
+{
+	if(brush->draw==NULL)
+		brush->draw=XftDrawCreate(ioncore_g.dpy, d,
+					  XftDEDefaultVisual(),
+					  DefaultColormap(ioncore_g.dpy,
+							  0));
+	else
+		XftDrawChange(brush->draw, d);
+
+	return brush->draw;
+}
+#endif
+
 /*}}}*/
 
 
diff -rN -u old-ion-3darcs/de/brush.h new-ion-3darcs/de/brush.h
--- old-ion-3darcs/de/brush.h	2006-12-02 13:37:17.344039750 +0100
+++ new-ion-3darcs/de/brush.h	2006-12-02 13:37:17.348040000 +0100
@@ -17,6 +17,9 @@
 #include <ioncore/common.h>
 #include <ioncore/gr.h>
 #include <ioncore/rectangle.h>
+#ifdef XFT
+#include <X11/Xft/Xft.h>
+#endif /* XFT */
 
 INTRCLASS(DEBrush);
 
@@ -34,6 +37,9 @@
 DECLCLASS(DEBrush){
     GrBrush grbrush;
     DEStyle *d;
+#ifdef XFT
+    XftDraw *draw;
+#endif
     DEBrushExtrasFn *extras_fn;
     int indicator_w;
     Window win;
@@ -104,5 +110,8 @@
                               const char *attr);
 extern void debrush_clear_area(DEBrush *brush, const WRectangle *geom);
 
+#ifdef XFT
+XftDraw *debrush_get_draw(DEBrush *brush, Drawable d);
+#endif
 
 #endif /* ION_DE_BRUSH_H */
diff -rN -u old-ion-3darcs/de/colour.c new-ion-3darcs/de/colour.c
--- old-ion-3darcs/de/colour.c	2006-12-02 13:37:17.344039750 +0100
+++ new-ion-3darcs/de/colour.c	2006-12-02 13:37:17.348040000 +0100
@@ -15,9 +15,21 @@
 
 bool de_alloc_colour(WRootWin *rootwin, DEColour *ret, const char *name)
 {
+#ifndef XFT
     XColor c;
     bool ok=FALSE;
+#else /* XFT */
+    if(name==NULL)
+	    return FALSE;
+    return XftColorAllocName(
+	    ioncore_g.dpy,
+	    XftDEDefaultVisual(),
+	    rootwin->default_cmap,
+	    name,
+	    ret);
+#endif /* XFT */
 
+#ifndef XFT
     if(name==NULL)
         return FALSE;
 
@@ -28,11 +40,13 @@
     }
     
     return ok;
+#endif /* ! XFT */
 }
 
 
 bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out)
 {
+#ifndef XFT
     XColor c;
     c.pixel=in;
     XQueryColor(ioncore_g.dpy, rootwin->default_cmap, &c);
@@ -41,11 +55,20 @@
         return TRUE;
     }
     return FALSE;
+#else /* XFT */
+    return XftColorAllocName(
+	    ioncore_g.dpy,
+	    XftDEDefaultVisual(),
+	    rootwin->default_cmap,
+	    &(in.color),
+	    out);
+#endif /* XFT */
 }
 
 
 void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg)
 {
+#ifndef XFT
     DEColour pixels[5];
     
     pixels[0]=cg->bg;
@@ -60,15 +83,26 @@
         free(cg->spec);
         cg->spec=NULL;
     }
+#else /* XFT */
+    de_free_colour(rootwin, cg->bg);
+    de_free_colour(rootwin, cg->fg);
+    de_free_colour(rootwin, cg->hl);
+    de_free_colour(rootwin, cg->sh);
+    de_free_colour(rootwin, cg->pad);
+#endif /* XFT */
 }
 
 
 void de_free_colour(WRootWin *rootwin, DEColour col)
 {
+#ifndef XFT
     DEColour pixels[1];
     
     pixels[0]=col;
     
     XFreeColors(ioncore_g.dpy, rootwin->default_cmap, pixels, 1, 0);
+#else /* XFT */
+    XftColorFree(ioncore_g.dpy, XftDEDefaultVisual(), rootwin->default_cmap, &col);
+#endif /* XFT */
 }
 
diff -rN -u old-ion-3darcs/de/colour.h new-ion-3darcs/de/colour.h
--- old-ion-3darcs/de/colour.h	2006-12-02 13:37:17.344039750 +0100
+++ new-ion-3darcs/de/colour.h	2006-12-02 13:37:17.352040250 +0100
@@ -15,12 +15,19 @@
 #include <ioncore/common.h>
 #include <ioncore/global.h>
 #include <ioncore/rootwin.h>
+#ifdef XFT
+#include <X11/Xft/Xft.h>
+#endif /* XFT */
 
 
 INTRSTRUCT(DEColourGroup);
 
 
+#ifndef XFT
 typedef unsigned long DEColour;
+#else /* XFT */
+typedef XftColor DEColour;
+#endif /* XFT */
 
 
 DECLSTRUCT(DEColourGroup){
@@ -37,5 +44,6 @@
 bool de_duplicate_colour(WRootWin *rootwin, DEColour in, DEColour *out);
 void de_free_colour_group(WRootWin *rootwin, DEColourGroup *cg);
 void de_free_colour(WRootWin *rootwin, DEColour col);
+#define XftDEDefaultVisual()    DefaultVisual(ioncore_g.dpy, 0)
 
 #endif /* ION_DE_COLOUR_H */
diff -rN -u old-ion-3darcs/de/draw.c new-ion-3darcs/de/draw.c
--- old-ion-3darcs/de/draw.c	2006-12-02 13:37:17.340039500 +0100
+++ new-ion-3darcs/de/draw.c	2006-12-02 13:37:17.352040250 +0100
@@ -22,6 +22,14 @@
 #include <X11/extensions/shape.h>
 
 
+#ifndef XFT
+#define PIXEL(x) x
+#else /* XFT */
+#define PIXEL(x) x.pixel
+#endif /* XFT */
+
+
+
 /*{{{ Colour group lookup */
 
 
@@ -80,8 +88,7 @@
     w--;
     h--;
 
-    XSetForeground(ioncore_g.dpy, gc, tlc);
-
+    XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc));
     
     a=(br!=0);
     b=0;
@@ -98,9 +105,8 @@
     
         XDrawLines(ioncore_g.dpy, win, gc, points, 3, CoordModeOrigin);
     }
-
     
-    XSetForeground(ioncore_g.dpy, gc, brc);
+    XSetForeground(ioncore_g.dpy, gc, PIXEL(brc));
 
     a=(tl!=0);
     b=0;
@@ -175,19 +181,19 @@
                             GrBorderLine line)
 {
     if(line==GR_BORDERLINE_LEFT && geom->h>0){
-        XSetForeground(ioncore_g.dpy, gc, tlc);
+        XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc));
         XDrawRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, tl, geom->h);
         geom->x+=tl;
     }else if(line==GR_BORDERLINE_TOP && geom->w>0){
-        XSetForeground(ioncore_g.dpy, gc, tlc);
+        XSetForeground(ioncore_g.dpy, gc, PIXEL(tlc));
         XDrawRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y, geom->w, tl);
         geom->y+=tl;
     }else if(line==GR_BORDERLINE_RIGHT && geom->h>0){
-        XSetForeground(ioncore_g.dpy, gc, brc);
+        XSetForeground(ioncore_g.dpy, gc, PIXEL(brc));
         XDrawRectangle(ioncore_g.dpy, win, gc, geom->x+geom->w-1-br, geom->y, br, geom->h);
         geom->w-=br;
     }else if(line==GR_BORDERLINE_BOTTOM && geom->w>0){
-        XSetForeground(ioncore_g.dpy, gc, brc);
+        XSetForeground(ioncore_g.dpy, gc, PIXEL(brc));
         XDrawRectangle(ioncore_g.dpy, win, gc, geom->x, geom->y+geom->h-1-br, geom->w, br);
         geom->h-=br;
     }
@@ -277,7 +283,7 @@
     }
     
     if(MATCHES2("*-*-tagged", a1, a2)){
-        XSetForeground(ioncore_g.dpy, d->copy_gc, cg->fg);
+        XSetForeground(ioncore_g.dpy, d->copy_gc, PIXEL(cg->fg));
             
         copy_masked(brush, d->tag_pixmap, brush->win, 0, 0,
                     d->tag_pixmap_w, d->tag_pixmap_h,
@@ -327,7 +333,7 @@
     GC gc=brush->d->normal_gc;
     
     if(TRUE/*needfill*/){
-        XSetForeground(ioncore_g.dpy, gc, cg->bg);
+        XSetForeground(ioncore_g.dpy, gc, PIXEL(cg->bg));
         XFillRectangle(ioncore_g.dpy, brush->win, gc, geom->x, geom->y, 
                        geom->w, geom->h);
     }
@@ -482,7 +488,7 @@
         attr.background_pixmap=ParentRelative;
     }else{
         attrflags=CWBackPixel;
-        attr.background_pixel=brush->d->cgrp.bg;
+        attr.background_pixel=brush->d->PIXEL(cgrp.bg);
     }
     
     XChangeWindowAttributes(ioncore_g.dpy, brush->win, attrflags, &attr);
@@ -498,7 +504,7 @@
     if(cg==NULL)
         return;
     
-    XSetForeground(ioncore_g.dpy, gc, cg->bg);
+    XSetForeground(ioncore_g.dpy, gc, PIXEL(cg->bg));
     XFillRectangle(ioncore_g.dpy, brush->win, gc, 
                    geom->x, geom->y, geom->w, geom->h);
 }
diff -rN -u old-ion-3darcs/de/font.c new-ion-3darcs/de/font.c
--- old-ion-3darcs/de/font.c	2006-12-02 13:37:17.340039500 +0100
+++ new-ion-3darcs/de/font.c	2006-12-02 13:37:17.352040250 +0100
@@ -14,7 +14,9 @@
 #include <libtu/objp.h>
 #include <ioncore/common.h>
 #include "font.h"
+#ifndef XFT
 #include "fontset.h"
+#endif /* ! XFT */
 #include "brush.h"
 
 
@@ -26,6 +28,9 @@
 
 DEFont *de_load_font(const char *fontname)
 {
+#ifdef XFT
+    XftFont *font;
+#endif
     DEFont *fnt;
     XFontSet fontset=NULL;
     XFontStruct *fontstruct=NULL;
@@ -40,6 +45,7 @@
         }
     }
     
+#ifndef XFT
     if(ioncore_g.use_mb){
         fontset=de_create_font_set(fontname);
         if(fontset!=NULL){
@@ -66,13 +72,34 @@
         return NULL;
     }
     
+#else /* XFT */
+    if(strncmp(fontname, "xft:", 4)==0){
+	    font=XftFontOpenName(ioncore_g.dpy, DefaultScreen(ioncore_g.dpy),
+				 fontname+4);
+    }else{
+	    font=XftFontOpenXlfd(ioncore_g.dpy, DefaultScreen(ioncore_g.dpy), fontname);
+    }
+    
+    if(font==NULL){
+	    if(strcmp(fontname, CF_FALLBACK_FONT_NAME)!=0){
+		    warn(TR("Could not load font \"%s\", trying \"%s\""),
+			 fontname, CF_FALLBACK_FONT_NAME);
+		    return de_load_font(CF_FALLBACK_FONT_NAME);
+	    }
+	    return NULL;
+    }
+#endif /* XFT */
     fnt=ALLOC(DEFont);
     
     if(fnt==NULL)
         return NULL;
     
+#ifndef XFT
     fnt->fontset=fontset;
     fnt->fontstruct=fontstruct;
+#else
+    fnt->font=font;
+#endif
     fnt->pattern=scopy(fontname);
     fnt->next=NULL;
     fnt->prev=NULL;
@@ -92,11 +119,13 @@
     style->font=font;
     font->refcount++;
     
+#ifndef XFT
     if(style->font->fontstruct!=NULL){
         XSetFont(ioncore_g.dpy, style->normal_gc, 
                  style->font->fontstruct->fid);
     }
 
+#endif /* ! XFT */
     return TRUE;
 }
 
@@ -111,11 +140,13 @@
     if(style->font==NULL)
         return FALSE;
     
+#ifndef XFT
     if(style->font->fontstruct!=NULL){
         XSetFont(ioncore_g.dpy, style->normal_gc, 
                  style->font->fontstruct->fid);
     }
     
+#endif /* ! XFT */
     return TRUE;
 }
 
@@ -125,10 +156,15 @@
     if(--font->refcount!=0)
         return;
     
+#ifndef XFT
     if(font->fontset!=NULL)
         XFreeFontSet(ioncore_g.dpy, font->fontset);
     if(font->fontstruct!=NULL)
         XFreeFont(ioncore_g.dpy, font->fontstruct);
+#else /* XFT */
+    if(font->font!=NULL)
+	    XftFontClose(ioncore_g.dpy, font->font);
+#endif /* XFT */
     if(font->pattern!=NULL)
         free(font->pattern);
     
@@ -156,6 +192,7 @@
 
 void defont_get_font_extents(DEFont *font, GrFontExtents *fnte)
 {
+#ifndef XFT
     if(font->fontset!=NULL){
         XFontSetExtents *ext=XExtentsOfFontSet(font->fontset);
         if(ext==NULL)
@@ -171,7 +208,14 @@
         fnte->baseline=fnt->ascent;
         return;
     }
-    
+#else /* XFT */
+    if(font->font!=NULL){
+	    fnte->max_height=font->font->ascent+font->font->descent;
+	    fnte->max_width=font->font->max_advance_width;
+	    fnte->baseline=font->font->ascent;
+	    return;
+    }
+#endif /* XFT */
 fail:
     DE_RESET_FONT_EXTENTS(fnte);
 }
@@ -188,20 +232,35 @@
 
 uint defont_get_text_width(DEFont *font, const char *text, uint len)
 {
+#ifndef XFT
     if(font->fontset!=NULL){
         XRectangle lext;
 #ifdef CF_DE_USE_XUTF8
-        if(ioncore_g.enc_utf8)
-            Xutf8TextExtents(font->fontset, text, len, NULL, &lext);
-        else
+	if(ioncore_g.enc_utf8)
+		Xutf8TextExtents(font->fontset, text, len, NULL, &lext);
+	else
 #endif
-            XmbTextExtents(font->fontset, text, len, NULL, &lext);
-        return lext.width;
+		XmbTextExtents(font->fontset, text, len, NULL, &lext);
+	return lext.width;
     }else if(font->fontstruct!=NULL){
         return XTextWidth(font->fontstruct, text, len);
     }else{
         return 0;
     }
+#else /* XFT */
+    if(font->font!=NULL){
+	    XGlyphInfo extents;
+	    if(ioncore_g.enc_utf8)
+		    XftTextExtentsUtf8(ioncore_g.dpy, font->font, (XftChar8 *)text, len,
+				       &extents);
+	    else
+		    XftTextExtents8(ioncore_g.dpy, font->font, (XftChar8 *)text, len,
+				    &extents);
+	    return extents.xOff;
+    }else{
+	    return 0;
+    }
+#endif /* XFT */
 }
 
 
@@ -211,6 +270,7 @@
 /*{{{ String drawing */
 
 
+#ifndef XFT
 void debrush_do_draw_string_default(DEBrush *brush, int x, int y,
                                     const char *str, int len, bool needfill, 
                                     DEColourGroup *colours)
@@ -256,6 +316,43 @@
     }
 }
 
+#else /* XFT */
+void debrush_do_draw_string_default(DEBrush *brush, 
+				    int x, int y, const char *str,
+				    int len, bool needfill, 
+				    DEColourGroup *colours)
+{
+   Window win = brush->win;
+   GC gc=brush->d->normal_gc;
+   XftDraw *draw;
+   XftFont *font;
+
+   if(brush->d->font==NULL)
+	   return;
+   
+   font=brush->d->font->font;
+   draw=debrush_get_draw(brush, win);
+   
+   if(TRUE/*needfill*/){
+	   XGlyphInfo extents;
+	   if(ioncore_g.enc_utf8)
+		   XftTextExtentsUtf8(ioncore_g.dpy, font, (XftChar8 *)str, len,
+				      &extents);
+	   else
+		   XftTextExtents8(ioncore_g.dpy, font, (XftChar8 *)str, len, &extents);
+	   XftDrawRect(draw, &(colours->bg), x-extents.x, y-extents.y,
+		       extents.width+10, extents.height);
+//		       extents.xOff, extents.yOff);
+	   //	   printf("drawing\n");
+   }
+   
+   if(ioncore_g.enc_utf8)
+	   XftDrawStringUtf8(draw, &(colours->fg), font, x, y, (XftChar8 *)str,
+			     len);
+   else
+	   XftDrawString8(draw, &(colours->fg), font, x, y, (XftChar8 *)str, len);
+}
+#endif /* XFT */
 
 void debrush_do_draw_string(DEBrush *brush, int x, int y,
                             const char *str, int len, bool needfill, 
diff -rN -u old-ion-3darcs/de/font.h new-ion-3darcs/de/font.h
--- old-ion-3darcs/de/font.h	2006-12-02 13:37:17.336039250 +0100
+++ new-ion-3darcs/de/font.h	2006-12-02 13:37:17.352040250 +0100
@@ -14,6 +14,9 @@
 
 #include <ioncore/common.h>
 #include <ioncore/gr.h>
+#ifdef XFT
+#include <X11/Xft/Xft.h>
+#endif /* XFT */
 
 INTRSTRUCT(DEFont);
 
@@ -29,6 +32,9 @@
     int refcount;
     XFontSet fontset;
     XFontStruct *fontstruct;
+#ifdef XFT /* XFT */
+    XftFont *font;
+#endif /* XFT */
     DEFont *next, *prev;
 };
 
diff -rN -u old-ion-3darcs/de/init.c new-ion-3darcs/de/init.c
--- old-ion-3darcs/de/init.c	2006-12-02 13:37:17.336039250 +0100
+++ new-ion-3darcs/de/init.c	2006-12-02 13:37:17.352040250 +0100
@@ -112,16 +112,19 @@
 void de_get_colour_group(WRootWin *rootwin, DEColourGroup *cg, 
                          ExtlTab tab, DEStyle *based_on)
 {
-    de_get_colour(rootwin, &(cg->hl), tab, based_on, "highlight_colour",
-                  DE_WHITE(rootwin));
-    de_get_colour(rootwin, &(cg->sh), tab, based_on, "shadow_colour",
-                  DE_WHITE(rootwin));
-    de_get_colour(rootwin, &(cg->bg), tab, based_on, "background_colour",
-                  DE_BLACK(rootwin));
-    de_get_colour(rootwin, &(cg->fg), tab, based_on, "foreground_colour",
-                  DE_WHITE(rootwin));
-    de_get_colour(rootwin, &(cg->pad), tab, based_on, "padding_colour", 
-                  cg->bg);
+    DEColour black, white;
+#ifdef XFT
+    de_alloc_colour(rootwin, &black, "black");
+    de_alloc_colour(rootwin, &white, "white");
+#else
+    black=DE_BLACK(rootwin);
+    white=DE_WHITE(rootwin);
+#endif
+    de_get_colour(rootwin, &(cg->hl), tab, based_on, "highlight_colour", white);
+    de_get_colour(rootwin, &(cg->sh), tab, based_on, "shadow_colour", white);
+    de_get_colour(rootwin, &(cg->bg), tab, based_on, "background_colour", black);
+    de_get_colour(rootwin, &(cg->fg), tab, based_on, "foreground_colour", white);
+    de_get_colour(rootwin, &(cg->pad), tab, based_on, "padding_colour", cg->bg);
 }
 
 
diff -rN -u old-ion-3darcs/de/style.c new-ion-3darcs/de/style.c
--- old-ion-3darcs/de/style.c	2006-12-02 13:37:17.336039250 +0100
+++ new-ion-3darcs/de/style.c	2006-12-02 13:37:17.352040250 +0100
@@ -74,10 +74,17 @@
     /*gcv.function=GXclear;*/
     gcv.stipple=stipple_pixmap;
     gcvmask=GCFillStyle|GCStipple/*|GCFunction*/;
+#ifndef XFT
     if(style->font!=NULL && style->font->fontstruct!=NULL){
         gcv.font=style->font->fontstruct->fid;
         gcvmask|=GCFont;
     }
+#else /* XFT */
+//    if(style->font!=NULL){
+//        gcv.font=style->font;
+//        gcvmask|=GCFont;
+//    }
+#endif /* XFT */
 
     style->stipple_gc=XCreateGC(dpy, root, gcvmask, &gcv);
     XCopyGC(dpy, style->normal_gc, 
@@ -206,6 +213,14 @@
 
 bool destyle_init(DEStyle *style, WRootWin *rootwin, const char *name)
 {
+    DEColour black, white;
+#ifdef XFT
+    de_alloc_colour(rootwin, &black, "black");
+    de_alloc_colour(rootwin, &white, "white");
+#else
+    black=DE_BLACK(rootwin);
+    white=DE_WHITE(rootwin);
+#endif /* XFT */
     style->style=scopy(name);
     if(style->style==NULL)
         return FALSE;
@@ -229,11 +244,11 @@
 
     style->cgrp_alloced=FALSE;
     style->cgrp.spec=NULL;
-    style->cgrp.bg=DE_BLACK(rootwin);
-    style->cgrp.pad=DE_BLACK(rootwin);
-    style->cgrp.fg=DE_WHITE(rootwin);
-    style->cgrp.hl=DE_WHITE(rootwin);
-    style->cgrp.sh=DE_WHITE(rootwin);
+    style->cgrp.bg=black;
+    style->cgrp.pad=black;
+    style->cgrp.fg=white;
+    style->cgrp.hl=white;
+    style->cgrp.sh=white;
     
     style->font=NULL;
     
diff -rN -u old-ion-3darcs/de/style.h new-ion-3darcs/de/style.h
--- old-ion-3darcs/de/style.h	2006-12-02 13:37:17.336039250 +0100
+++ new-ion-3darcs/de/style.h	2006-12-02 13:37:17.352040250 +0100
@@ -76,6 +76,7 @@
     Pixmap tag_pixmap;
     int tag_pixmap_w;
     int tag_pixmap_h;
+    int xft_style;
     
     DEStyle *next, *prev;
 };
diff -rN -u old-ion-3darcs/mod_query/wedln.c new-ion-3darcs/mod_query/wedln.c
--- old-ion-3darcs/mod_query/wedln.c	2006-12-02 13:37:17.336039250 +0100
+++ new-ion-3darcs/mod_query/wedln.c	2006-12-02 13:37:17.476048000 +0100
@@ -90,12 +90,12 @@
     const char *cursorstyle=(REGION_IS_ACTIVE(wedln)
                              ? "active-cursor" : "inactive-cursor");
     
-    /*if(tx<geom->w){
+    if(tx<geom->w){
         WRectangle g=*geom;
         g.x+=tx;
         g.w-=tx;
         grbrush_clear_area(WEDLN_BRUSH(wedln), &g);
-    }*/
+    }
     
     ty=calc_text_y(wedln, geom);
 

Sat Dec  2 17:35:11 CET 2006  Clemens Fruhwirth <clemens@endorphin.org>
  * Cleanups to XFT string drawing, I forgot
diff -rN -u old-ion-3darcs/de/font.c new-ion-3darcs/de/font.c
--- old-ion-3darcs/de/font.c	2006-12-04 21:42:34.614312000 +0100
+++ new-ion-3darcs/de/font.c	2006-12-04 21:42:34.618312250 +0100
@@ -333,7 +333,7 @@
    font=brush->d->font->font;
    draw=debrush_get_draw(brush, win);
    
-   if(TRUE/*needfill*/){
+   if(needfill){
 	   XGlyphInfo extents;
 	   if(ioncore_g.enc_utf8)
 		   XftTextExtentsUtf8(ioncore_g.dpy, font, (XftChar8 *)str, len,
@@ -342,8 +342,6 @@
 		   XftTextExtents8(ioncore_g.dpy, font, (XftChar8 *)str, len, &extents);
 	   XftDrawRect(draw, &(colours->bg), x-extents.x, y-extents.y,
 		       extents.width+10, extents.height);
-//		       extents.xOff, extents.yOff);
-	   //	   printf("drawing\n");
    }
    
    if(ioncore_g.enc_utf8)

