From 61432f3c09711bf6690af0d851a5fda92c009153 Mon Sep 17 00:00:00 2001 From: sabetts Date: Thu, 24 Jan 2002 21:57:44 +0000 Subject: * src/messages.h (MESSAGE_FRAME_STRING): Pad the string with spaces on both sides. * src/main.c (init_screen): Create the frame, input, and bar windows with a border width of defaults.bar_border_width. (init_defaults): initialize defaults.bar_border_width * src/bar.c (bar_x): Incorporate defaults.bar_border_width into calculations. (bar_y): likewise * src/actions.h (cmd_defbarborder): new prototype * src/actions.c (user_commands): new command "defbarborder" (cmd_defbarborder): new function * src/main.c (init_screen): create the help window with a 0 border width. --- src/main.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 5a761da..2ba8ecf 100644 --- a/src/main.c +++ b/src/main.c @@ -412,6 +412,7 @@ init_defaults () defaults.bar_y_padding = 0; defaults.bar_location = NorthEastGravity; defaults.bar_timeout = 5; + defaults.bar_border_width = 1; defaults.frame_indicator_timeout = 1; @@ -618,22 +619,26 @@ init_screen (screen_info *s, int screen_num) /* Create the program bar window. */ s->bar_is_raised = 0; - s->bar_window = XCreateSimpleWindow (dpy, s->root, 0, 0, - 1, 1, 1, s->fg_color, s->bg_color); + s->bar_window = XCreateSimpleWindow (dpy, s->root, 0, 0, 1, 1, + defaults.bar_border_width, + s->fg_color, s->bg_color); /* Setup the window that will recieve all keystrokes once the prefix key has been pressed. */ - s->key_window = XCreateSimpleWindow (dpy, s->root, 0, 0, 1, 1, 0, WhitePixel (dpy, s->screen_num), BlackPixel (dpy, s->screen_num)); + s->key_window = XCreateSimpleWindow (dpy, s->root, 0, 0, 1, 1, 0, + WhitePixel (dpy, s->screen_num), + BlackPixel (dpy, s->screen_num)); XSelectInput (dpy, s->key_window, KeyPressMask ); XMapWindow (dpy, s->key_window); /* Create the input window. */ - s->input_window = XCreateSimpleWindow (dpy, s->root, 0, 0, - 1, 1, 1, s->fg_color, s->bg_color); + s->input_window = XCreateSimpleWindow (dpy, s->root, 0, 0, 1, 1, + defaults.bar_border_width, + s->fg_color, s->bg_color); XSelectInput (dpy, s->input_window, KeyPressMask ); /* Create the frame indicator window */ - s->frame_window = XCreateSimpleWindow (dpy, s->root, 1, 1, 1, 1, 1, + s->frame_window = XCreateSimpleWindow (dpy, s->root, 1, 1, 1, 1, defaults.bar_border_width, s->fg_color, s->bg_color); /* Create the help window */ -- cgit v1.2.3