summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-04-15 19:56:15 +0000
committersabetts <sabetts>2001-04-15 19:56:15 +0000
commitac84e85590a5a32c9db3979a4c05475e10d97a79 (patch)
tree6d2931bdabaa25260b8ee5c8430cd754283cf7e1 /src/main.c
parent58214c0d8b72ade928ce491da191af70d789e83b (diff)
downloadratpoison-ac84e85590a5a32c9db3979a4c05475e10d97a79.zip
* src/messages.h (MESSAGE_WELCOME): new define
* src/manage.c (scanwins): ignore the help window (hide_window): increment window's iconizing variable * src/main.c (main): display welcoming message (init_screen): create the help window (init_screen): don't map the frame indicator window (clean_up): destroy the help window * src/list.c (add_to_window_list): initialize iconizing to 0 * src/events.c (new_window): skip help_window (unmap_notify): skip normal processing if the event is from iconizing the window. (unmap_notify): clean up the window's frame if it is being withdrawn. * src/data.h (struct screen_info): new variable help_window * src/bar.c (update_window_names): only print the window list if the bar is already displaying the window list. * src/actions.h (cmd_help): new prototype (cmd_quit): likewise * src/actions.c (initialize_default_keybindings): new keybinding for "help" (cmd_quit): new function (cmd_help): likewise
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index ebe18c1..c9f3875 100644
--- a/src/main.c
+++ b/src/main.c
@@ -442,6 +442,9 @@ main (int argc, char *argv[])
}
read_startup_files ();
+
+ /* Indicate to the user that ratpoison has booted */
+ message (MESSAGE_WELCOME);
handle_events ();
@@ -544,13 +547,15 @@ init_screen (screen_info *s, int screen_num)
1, 1, 1, fg_color.pixel, bg_color.pixel);
XSelectInput (dpy, s->input_window, KeyPressMask );
- s->frame_window = XCreateSimpleWindow (dpy, s->root,
- s->root_attr.width / 2 - 5,
- s->root_attr.height / 2 - 5,
- 10, 10, 1,
+ /* Create the frame indicator window */
+ s->frame_window = XCreateSimpleWindow (dpy, s->root, 1, 1, 1, 1, 1,
fg_color.pixel, bg_color.pixel);
XSelectInput (dpy, s->frame_window, KeyPressMask );
- XMapRaised (dpy, s->frame_window);
+
+ /* Create the help window */
+ s->help_window = XCreateSimpleWindow (dpy, s->root, 0, 0, s->root_attr.width,
+ s->root_attr.height, 1, fg_color.pixel, bg_color.pixel);
+ XSelectInput (dpy, s->help_window, KeyPressMask);
XSync (dpy, 0);
@@ -582,6 +587,7 @@ clean_up ()
XDestroyWindow (dpy, screens[i].key_window);
XDestroyWindow (dpy, screens[i].input_window);
XDestroyWindow (dpy, screens[i].frame_window);
+ XDestroyWindow (dpy, screens[i].help_window);
XFreeCursor (dpy, screens[i].rat);
XFreeColormap (dpy, screens[i].def_cmap);