]> Dogcows Code - chaz/openbox/blob - openbox/xerror.c
always send the event on a final configure even if there was no real move
[chaz/openbox] / openbox / xerror.c
1 #include "openbox.h"
2 #include <glib.h>
3 #include <X11/Xlib.h>
4
5 static gboolean xerror_ignore = FALSE;
6
7 int xerror_handler(Display *d, XErrorEvent *e)
8 {
9 #ifdef DEBUG
10 if (!xerror_ignore) {
11 char errtxt[128];
12
13 /*if (e->error_code != BadWindow) */
14 {
15 XGetErrorText(d, e->error_code, errtxt, 127);
16 if (e->error_code == BadWindow)
17 g_warning("X Error: %s", errtxt);
18 else
19 g_error("X Error: %s", errtxt);
20 }
21 }
22 #else
23 (void)d; (void)e;
24 #endif
25 return 0;
26 }
27
28 void xerror_set_ignore(gboolean ignore)
29 {
30 XSync(ob_display, FALSE);
31 xerror_ignore = ignore;
32 }
This page took 0.038222 seconds and 4 git commands to generate.