diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-02-06 19:03:07 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-02-06 21:17:54 +0100 |
commit | 2685676e118cd63380e6a12ce81ce5d4f0badc0a (patch) | |
tree | e32bbf16aa5d84a68edfa061f68506a876f966fe /src/globals.c | |
parent | 20c5d11a3be2843c808ba84f971ed3fed011e144 (diff) | |
download | ratpoison-2685676e118cd63380e6a12ce81ce5d4f0badc0a.zip |
rp_text_width: remove "font" argument
* (globals.[ch]): remove rp_text_width "font" arg, since its value
is always the global variable defaults.font (non-Xft case).
remove one #ifdef while here
* update rp_text_width() calls to match new signature
Diffstat (limited to 'src/globals.c')
-rw-r--r-- | src/globals.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/globals.c b/src/globals.c index fda69bf..05ebe28 100644 --- a/src/globals.c +++ b/src/globals.c @@ -321,12 +321,9 @@ rp_draw_string (rp_screen *s, Drawable d, int style, int x, int y, } int -#ifdef USE_XFT_FONT -rp_text_width (rp_screen *s, XFontSet font UNUSED, char *string, int count) -#else -rp_text_width (rp_screen *s UNUSED, XFontSet font, char *string, int count) -#endif +rp_text_width (rp_screen *s, char *string, int count) { + (void) s; /* avoid "unused" warning */ if (count < 0) count = strlen (string); @@ -343,7 +340,7 @@ rp_text_width (rp_screen *s UNUSED, XFontSet font, char *string, int count) PRINT_ERROR (("No Xft font available.\n")); return 0; #else - return XmbTextEscapement (font, string, count); + return XmbTextEscapement (defaults.font, string, count); #endif } |