summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-10-17 09:30:43 +0000
committersabetts <sabetts>2000-10-17 09:30:43 +0000
commit53e1ff2c79b3b9f3bcece9281531ab6afdb844e6 (patch)
treed6f78af9bb46e9ad40242e3a943bb21886e93264 /src/main.c
parent17b9be354e5b1f2b5db4d3e044435698a17b2be6 (diff)
downloadratpoison-53e1ff2c79b3b9f3bcece9281531ab6afdb844e6.zip
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
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 7 insertions, 5 deletions
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