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/input.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/input.c')
-rw-r--r-- | src/input.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/input.c b/src/input.c index 8c8ab80..c8c031e 100644 --- a/src/input.c +++ b/src/input.c @@ -428,8 +428,8 @@ read_key (KeySym *keysym, unsigned int *modifiers, char *keysym_name, int len) static void update_input_window (rp_screen *s, rp_input_line *line) { - int prompt_width = rp_text_width (s, defaults.font, line->prompt, -1); - int input_width = rp_text_width (s, defaults.font, line->buffer, line->length); + int prompt_width = rp_text_width (s, line->prompt, -1); + int input_width = rp_text_width (s, line->buffer, line->length); int total_width; GC lgc; XGCValues gcv; @@ -468,9 +468,10 @@ update_input_window (rp_screen *s, rp_input_line *line) /* Draw a cheap-o cursor - MkII */ XFillRectangle (dpy, s->input_window, lgc, - defaults.bar_x_padding + prompt_width + rp_text_width (s, defaults.font, line->buffer, line->position), + defaults.bar_x_padding + prompt_width + + rp_text_width (s, line->buffer, line->position), defaults.bar_y_padding, - rp_text_width (s, defaults.font, &line->buffer[line->position], 1), + rp_text_width (s, &line->buffer[line->position], 1), FONT_HEIGHT (s)); XFlush (dpy); |