wmii/lib/libstuff/event/reparentnotify.c
2010-06-04 20:37:05 -04:00

18 lines
426 B
C

/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
* See LICENSE file for license details.
*/
#include "event.h"
void
event_reparentnotify(XReparentEvent *ev) {
Window *target, *w;
w = nil;
if((target = findwin(ev->window)) && (w = findwin(ev->parent)))
target->parent = w;
if((w = findwin(ev->event)))
event_handle(w, reparent, ev);
if(ev->send_event && target)
event_handle(target, reparent, ev);
}