summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2002-07-28 23:07:04 +0000
committersabetts <sabetts>2002-07-28 23:07:04 +0000
commit7ba1b046c9cd461f96917746dd982c049c3afe92 (patch)
treefe71cc4a49f0b73b0aa2c75471eb2ab114999693
parent538c8055da7ed86f159a7c5dc8aaf867d14385df (diff)
downloadratpoison-7ba1b046c9cd461f96917746dd982c049c3afe92.zip
* src/main.c (handler): do not report badwindow errors if
IGNORE_BADWINDOW is define. * src/conf.h (IGNORE_BADWINDOW): new define
-rw-r--r--ChangeLog7
-rw-r--r--src/conf.h5
-rw-r--r--src/main.c4
3 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 56413ef..55781f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-07-28 Shawn Betts <sabetts@vcn.bc.ca>
+
+ * src/main.c (handler): do not report badwindow errors if
+ IGNORE_BADWINDOW is define.
+
+ * src/conf.h (IGNORE_BADWINDOW): new define
+
2002-07-06 Shawn Betts <sabetts@vcn.bc.ca>
* src/actions.c (cmd_help): key descriptions don't run off the
diff --git a/src/conf.h b/src/conf.h
index ed6d7c2..2002a3e 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -68,4 +68,9 @@
/* Maximum depth of a link. Used in the 'link' command. */
#define MAX_LINK_DEPTH 16
+/* Bad window messages can be safely ignored now that ratpoison has
+ become stable enough. Comment this line if you wish to be notified
+ about bad window messages. */
+#define IGNORE_BADWINDOW 1
+
#endif /* !_ _RATPOISON_CONF_H */
diff --git a/src/main.c b/src/main.c
index ae698c5..5980ce1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -211,7 +211,11 @@ handler (Display *d, XErrorEvent *e)
exit(EXIT_FAILURE);
}
+#ifdef IGNORE_BADWINDOW
+ return 0;
+#else
if (ignore_badwindow && e->error_code == BadWindow) return 0;
+#endif
XGetErrorText (d, e->error_code, error_msg, sizeof (error_msg));
fprintf (stderr, "ratpoison: ERROR: %s!\n", error_msg);