summaryrefslogtreecommitdiffstats
path: root/tools/aewm-drakx/misc.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-15 13:41:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-15 13:41:51 +0000
commitae1ca0772cea076c0098a83c15de2581e8aee3f5 (patch)
tree3df8809b28956670bca8ba3b447409c5d8bdfdd5 /tools/aewm-drakx/misc.c
parent1e19a1f7ea181f9fd40e0f81ac3b7fda8563d391 (diff)
downloaddrakx-ae1ca0772cea076c0098a83c15de2581e8aee3f5.tar
drakx-ae1ca0772cea076c0098a83c15de2581e8aee3f5.tar.gz
drakx-ae1ca0772cea076c0098a83c15de2581e8aee3f5.tar.bz2
drakx-ae1ca0772cea076c0098a83c15de2581e8aee3f5.tar.xz
drakx-ae1ca0772cea076c0098a83c15de2581e8aee3f5.zip
- add and use aewm-drakx
- add some "skip" title on help/logo/steps windows so that aewm-drakx know they don't need keyboard focus - add some more title to ease debugging (when aewm-drakx is in debug mode)
Diffstat (limited to 'tools/aewm-drakx/misc.c')
-rw-r--r--tools/aewm-drakx/misc.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/aewm-drakx/misc.c b/tools/aewm-drakx/misc.c
new file mode 100644
index 000000000..9542c2cc3
--- /dev/null
+++ b/tools/aewm-drakx/misc.c
@@ -0,0 +1,30 @@
+/* aewm - a minimalistic X11 window manager. ------- vim:sw=4:et
+ * Copyright (c) 1998-2001 Decklin Foster <decklin@red-bean.com>
+ * Free software! Please see README for details and license. */
+
+#include "aewm.h"
+#include <stdarg.h>
+
+
+void err(const char *fmt, ...)
+{
+ va_list argp;
+
+ fprintf(stderr, "aewm: ");
+ va_start(argp, fmt);
+ vfprintf(stderr, fmt, argp);
+ va_end(argp);
+ fprintf(stderr, "\n");
+}
+
+int handle_xerror(Display *dpy, XErrorEvent *e)
+{
+ Client *c = find_client(e->resourceid);
+
+ char msg[255];
+ XGetErrorText(dpy, e->error_code, msg, sizeof msg);
+ err("X error (%#lx): %s", e->resourceid, msg);
+
+ if (c) remove_client(c);
+ return 0;
+}