mirror of
https://github.com/0intro/wmii
synced 2024-11-24 22:59:45 +03:00
[witray] Handle badly behavied clients. Closes issue #183.
This commit is contained in:
parent
b5aeb2a323
commit
f70a4130bd
@ -172,19 +172,29 @@ configreq_event(Window *w, void *aux, XConfigureRequestEvent *e) {
|
||||
static void
|
||||
map_event(Window *w, void *aux, XMapEvent *e) {
|
||||
|
||||
Dprint("client map_event(%W)\n", w);
|
||||
w->mapped = true;
|
||||
tray_update();
|
||||
}
|
||||
|
||||
static void
|
||||
unmap_event(Window *w, void *aux, XUnmapEvent *e) {
|
||||
|
||||
Dprint("client map_event(%W)\n", w);
|
||||
tray_update();
|
||||
}
|
||||
|
||||
static void
|
||||
reparent_event(Window *w, void *aux, XReparentEvent *e) {
|
||||
|
||||
Dprint("client reparent_event(%W)\n", w);
|
||||
}
|
||||
|
||||
static Handlers handlers = {
|
||||
.config = config_event,
|
||||
.configreq = configreq_event,
|
||||
.map = map_event,
|
||||
.unmap = unmap_event,
|
||||
.reparent = reparent_event,
|
||||
};
|
||||
|
||||
|
@ -56,8 +56,10 @@ void
|
||||
xembed_disown(XEmbed *xembed) {
|
||||
|
||||
pophandler(xembed->w, &handlers);
|
||||
if(xembed->flags != DEAD)
|
||||
if(xembed->flags != DEAD) {
|
||||
reparentwindow(xembed->w, &scr.root, ZP);
|
||||
unmapwin(xembed->w);
|
||||
}
|
||||
if(xembed->cleanup)
|
||||
xembed->cleanup(xembed);
|
||||
free(xembed);
|
||||
|
@ -17,7 +17,7 @@ TERMINAL = xterm
|
||||
|
||||
# Flags
|
||||
include $(ROOT)/mk/gcc.mk
|
||||
CFLAGS += $(DEBUGCFLAGS) -O0
|
||||
CFLAGS += -Os $(DEBUGCFLAGS)
|
||||
LDFLAGS += -g
|
||||
|
||||
# Compiler, Linker. Linker should usually *not* be ld.
|
||||
|
@ -7,6 +7,6 @@ void
|
||||
event_mapnotify(XMapEvent *ev) {
|
||||
Window *w;
|
||||
|
||||
if((w = findwin(ev->window)))
|
||||
if((w = findwin(ev->event)))
|
||||
event_handle(w, map, ev);
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ void
|
||||
event_maprequest(XMapRequestEvent *ev) {
|
||||
Window *w;
|
||||
|
||||
if((w = findwin(ev->parent)))
|
||||
if((w = findwin(ev->parent)))
|
||||
event_handle(w, mapreq, ev);
|
||||
}
|
||||
|
@ -7,6 +7,6 @@ void
|
||||
event_reparentnotify(XReparentEvent *ev) {
|
||||
Window *w;
|
||||
|
||||
if((w = findwin(ev->window)))
|
||||
if((w = findwin(ev->event)))
|
||||
event_handle(w, reparent, ev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user