changeset: 122:492dde7f650b
tag: tip
user: Enno Boland (tox) <tox_AT_s01.de>
date: Wed Oct 28 11:40:02 2009 +0100
files: tabbed.c
description:
works better now with windowmanager who use mapping/unmapping
diff -r 7a8ec02f5e9a -r 492dde7f650b tabbed.c
--- a/tabbed.c Tue Oct 27 21:59:30 2009 +0100
+++ b/tabbed.c Wed Oct 28 11:40:02 2009 +0100
@@ -83,6 +83,7 @@
struct Client *next;
Window win;
int tabx;
+ Bool mapped;
} Client;
/* function declarations */
@@ -121,7 +122,6 @@
static void spawn(const Arg *arg);
static int textnw(const char *text, unsigned int len);
static void unmanage(Client *c);
-static void unmapnotify(const XEvent *e);
static void updatenumlockmask(void);
static void updatetitle(Client *c);
static int xerror(Display *dpy, XErrorEvent *ee);
@@ -140,7 +140,6 @@
[FocusIn] = focusin,
[KeyPress] = keypress,
[PropertyNotify] = propertynotify,
- [UnmapNotify] = unmapnotify,
};
static int bh, wx, wy, ww, wh;
static unsigned int numlockmask = 0;
@@ -765,15 +764,6 @@
}
void
-unmapnotify(const XEvent *e) {
- const XUnmapEvent *ev = &e->xunmap;
- Client *c;
-
- if((c = getclient(ev->window)))
- unmanage(c);
-}
-
-void
updatenumlockmask(void) {
unsigned int i, j;
XModifierKeymap *modmap;
@@ -801,6 +791,16 @@
* default error handler, which may call exit. */
int
xerror(Display *dpy, XErrorEvent *ee) {
+ if(ee->error_code == BadWindow
+ || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
+ || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
+ || (ee->request_code == X_PolyFillRectangle && ee->error_code == BadDrawable)
+ || (ee->request_code == X_PolySegment && ee->error_code == BadDrawable)
+ || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch)
+ || (ee->request_code == X_GrabButton && ee->error_code == BadAccess)
+ || (ee->request_code == X_GrabKey && ee->error_code == BadAccess)
+ || (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
+ return 0;
fprintf(stderr, "tabbed: fatal error: request code=%d, error code=%d\n",
ee->request_code, ee->error_code);
return xerrorxlib(dpy, ee); /* may call exit */
Received on Wed Oct 28 2009 - 10:40:07 UTC
This archive was generated by hypermail 2.2.0 : Wed Oct 28 2009 - 10:48:28 UTC