tabbed: UnmapNotify patch

Hi,

Simple patch for tabbed that prevents tabbed from killing a client that it
should no longer be managing due to an UnmapNotify event.

Add support for UnmapNotify; allows a window to map and unmap without
needing it to be destroyed.

Thanks,
Okan

Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
Okan Demirmen 2014-09-10 13:50:34 -04:00 committed by Christoph Lohmann
parent b4fed5a100
commit 5c560f3784

View file

@ -93,6 +93,7 @@ static void clientmessage(const XEvent *e);
static void configurenotify(const XEvent *e);
static void configurerequest(const XEvent *e);
static void createnotify(const XEvent *e);
static void unmapnotify(const XEvent *e);
static void destroynotify(const XEvent *e);
static void die(const char *errstr, ...);
static void drawbar(void);
@ -141,6 +142,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = {
[ConfigureNotify] = configurenotify,
[ConfigureRequest] = configurerequest,
[CreateNotify] = createnotify,
[UnmapNotify] = unmapnotify,
[DestroyNotify] = destroynotify,
[Expose] = expose,
[FocusIn] = focusin,
@ -285,6 +287,15 @@ createnotify(const XEvent *e) {
manage(ev->window);
}
void
unmapnotify(const XEvent *e) {
const XUnmapEvent *ev = &e->xunmap;
int c;
if((c = getclient(ev->window)) > -1)
unmanage(c);
}
void
destroynotify(const XEvent *e) {
const XDestroyWindowEvent *ev = &e->xdestroywindow;