From 53e1ff2c79b3b9f3bcece9281531ab6afdb844e6 Mon Sep 17 00:00:00 2001 From: sabetts Date: Tue, 17 Oct 2000 09:30:43 +0000 Subject: fixed bug that lost focus of any window when the current window was unmapped. moved key strokes into a structure in actions.c along with all key stroke functi ons. added ability to ignore badwindow errors. fixed up unmap_notify function. w hen waiting for a keystroke after the prefix has been hit, pressing a modifier d oesn't count as a 'keystroke' and doesn't abort the current key combination bein g keyed --- src/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 253efe9..8ac4bd5 100644 --- a/src/main.c +++ b/src/main.c @@ -45,8 +45,9 @@ Atom rp_kill; screen_info *screens; int num_screens; Display *dpy; -int exit_signal = 0; /* Set by the signal handler. if this - is set, quit. */ + +int ignore_badwindow = 0; + static XFontStruct *font; char **myargv; @@ -57,7 +58,7 @@ static struct option ratpoison_longopts[] = { {"help", no_argument, 0, 'h'}, {"restart", no_argument, 0, 'r'}, {"kill", no_argument, 0, 'k'}, {0, 0, 0, 0} }; -static char ratpoison_opts[] = "hv"; +static char ratpoison_opts[] = "hvrk"; void sighandler () @@ -145,11 +146,12 @@ handler (Display *d, XErrorEvent *e) exit(EXIT_FAILURE); } + if (ignore_badwindow && e->error_code == BadWindow) return 0; + XGetErrorText (d, e->error_code, error_msg, sizeof (error_msg)); fprintf (stderr, "ratpoison: %s!\n", error_msg); - return 0; - /* exit (EXIT_FAILURE); */ + exit (EXIT_FAILURE); } void -- cgit v1.2.3