diff options
author | Shawn Betts <sabetts@gmail.com> | 2009-07-04 20:58:21 -0700 |
---|---|---|
committer | Shawn Betts <sabetts@gmail.com> | 2009-07-04 20:58:21 -0700 |
commit | 14beabe55fa3cac03f598e138f363f1d50659564 (patch) | |
tree | 2a23a383df0a818d60593e34d7dd73f1d408658a /src/globals.c | |
parent | 166021512b2e39344ff4562323d15a1e2fdea153 (diff) | |
download | ratpoison-14beabe55fa3cac03f598e138f363f1d50659564.zip |
fix inverted text when using xftwinliststyle-row_broken
Now the inverted rectangle is drawn first and the text overtop in the bg color.
Diffstat (limited to 'src/globals.c')
-rw-r--r-- | src/globals.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/globals.c b/src/globals.c index f21195f..7446bca 100644 --- a/src/globals.c +++ b/src/globals.c @@ -272,7 +272,7 @@ init_globals (void) /* Wrapper font functions to support Xft */ void -rp_draw_string (rp_screen *s, Drawable d, GC gc, int x, int y, char *string, int length) +rp_draw_string (rp_screen *s, Drawable d, int style, int x, int y, char *string, int length) { if (length < 0) length = strlen (string); @@ -285,7 +285,7 @@ rp_draw_string (rp_screen *s, Drawable d, GC gc, int x, int y, char *string, int DefaultColormap (dpy, s->screen_num)); if (draw) { - XftDrawString8 (draw, &s->xft_color, s->xft_font, x, y, (FcChar8*) string, length); + XftDrawString8 (draw, style == STYLE_NORMAL ? &s->xft_fg_color:&s->xft_bg_color, s->xft_font, x, y, (FcChar8*) string, length); XftDrawDestroy (draw); } else @@ -293,7 +293,7 @@ rp_draw_string (rp_screen *s, Drawable d, GC gc, int x, int y, char *string, int } else #endif - XmbDrawString (dpy, d, defaults.font, gc, x, y, string, length); + XmbDrawString (dpy, d, defaults.font, style == STYLE_NORMAL ? s->normal_gc:s->inverse_gc, x, y, string, length); } int |