2010-05-27 11:58:02 +04:00
|
|
|
/* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
|
|
|
|
* See LICENSE file for license details.
|
|
|
|
*/
|
|
|
|
#include "event.h"
|
|
|
|
|
|
|
|
void
|
|
|
|
event_reparentnotify(XReparentEvent *ev) {
|
2010-06-05 04:37:05 +04:00
|
|
|
Window *target, *w;
|
2010-05-27 11:58:02 +04:00
|
|
|
|
2010-06-05 04:37:05 +04:00
|
|
|
w = nil;
|
|
|
|
if((target = findwin(ev->window)) && (w = findwin(ev->parent)))
|
|
|
|
target->parent = w;
|
2010-05-27 21:55:34 +04:00
|
|
|
if((w = findwin(ev->event)))
|
2010-05-27 11:58:02 +04:00
|
|
|
event_handle(w, reparent, ev);
|
2010-06-05 04:37:05 +04:00
|
|
|
if(ev->send_event && target)
|
|
|
|
event_handle(target, reparent, ev);
|
2010-05-27 11:58:02 +04:00
|
|
|
}
|