diff options
-rw-r--r-- | src/input.c | 10 | ||||
-rw-r--r-- | src/main.c | 23 |
2 files changed, 17 insertions, 16 deletions
diff --git a/src/input.c b/src/input.c index b6040fb..993b581 100644 --- a/src/input.c +++ b/src/input.c @@ -136,7 +136,7 @@ get_input (screen_info *s, char *prompt, char *str, int len) int revert; Window fwin; int prompt_width = XTextWidth (s->font, prompt, strlen (prompt)); - int width = 100 + prompt_width; + int width = 200 + prompt_width; /* We don't want to draw overtop of the program bar. */ hide_bar (s); @@ -149,7 +149,7 @@ get_input (screen_info *s, char *prompt, char *str, int len) XRaiseWindow (dpy, s->input_window); /* draw the window prompt. */ - XDrawString (dpy, s->input_window, s->bold_gc, BAR_X_PADDING, + XDrawString (dpy, s->input_window, s->normal_gc, BAR_X_PADDING, BAR_Y_PADDING + s->font->max_bounds.ascent, prompt, strlen (prompt)); @@ -167,10 +167,10 @@ get_input (screen_info *s, char *prompt, char *str, int len) { if (cur_len > 0) cur_len--; XClearWindow (dpy, s->input_window); - XDrawString (dpy, s->input_window, s->bold_gc, BAR_X_PADDING, + XDrawString (dpy, s->input_window, s->normal_gc, BAR_X_PADDING, BAR_Y_PADDING + s->font->max_bounds.ascent, prompt, strlen (prompt)); - XDrawString (dpy, s->input_window, s->bold_gc, + XDrawString (dpy, s->input_window, s->normal_gc, BAR_X_PADDING + prompt_width, BAR_Y_PADDING + s->font->max_bounds.ascent, str, cur_len); @@ -180,7 +180,7 @@ get_input (screen_info *s, char *prompt, char *str, int len) str[cur_len] = ch; if (cur_len < len - 1) cur_len++; - XDrawString (dpy, s->input_window, s->bold_gc, + XDrawString (dpy, s->input_window, s->normal_gc, BAR_X_PADDING + prompt_width, BAR_Y_PADDING + s->font->max_bounds.ascent, str, cur_len); } @@ -57,6 +57,8 @@ static XFontStruct *font; char **myargv; +XGCValues gv; + /* Command line options */ static struct option ratpoison_longopts[] = { {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, @@ -285,8 +287,7 @@ main (int argc, char *argv[]) static void init_screen (screen_info *s, int screen_num) { - XColor fg_color, bg_color, bold_color, junk; - XGCValues gv; + XColor fg_color, bg_color,/* bold_color, */ junk; s->screen_num = screen_num; s->root = RootWindow (dpy, screen_num); @@ -305,10 +306,10 @@ init_screen (screen_info *s, int screen_num) fprintf (stderr, "ratpoison: Unknown color '%s'\n", BAR_BG_COLOR); } - if (!XAllocNamedColor (dpy, s->def_cmap, BAR_BOLD_COLOR, &bold_color, &junk)) - { - fprintf (stderr, "ratpoison: Unknown color '%s'\n", BAR_BOLD_COLOR); - } +/* if (!XAllocNamedColor (dpy, s->def_cmap, BAR_BOLD_COLOR, &bold_color, &junk)) */ +/* { */ +/* fprintf (stderr, "ratpoison: Unknown color '%s'\n", BAR_BOLD_COLOR); */ +/* } */ /* Setup the GC for drawing the font. */ gv.foreground = fg_color.pixel; @@ -321,11 +322,11 @@ init_screen (screen_info *s, int screen_num) GCForeground | GCBackground | GCFunction | GCLineWidth | GCSubwindowMode | GCFont, &gv); - gv.foreground = bold_color.pixel; - s->bold_gc = XCreateGC(dpy, s->root, - GCForeground | GCBackground | GCFunction - | GCLineWidth | GCSubwindowMode | GCFont, - &gv); +/* gv.foreground = bold_color.pixel; */ +/* s->bold_gc = XCreateGC(dpy, s->root, */ +/* GCForeground | GCBackground | GCFunction */ +/* | GCLineWidth | GCSubwindowMode | GCFont, */ +/* &gv); */ XSelectInput(dpy, s->root, PropertyChangeMask | ColormapChangeMask |