wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

reparentnotify.c (483B)


      1 /* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include "event.h"
      5 
      6 void
      7 event_reparentnotify(XReparentEvent *ev) {
      8 	Window *target, *w;
      9 
     10 	if(!ev->send_event)
     11 		event_lastconfigure = ev->serial;
     12 	w = nil;
     13 	if((target = findwin(ev->window)) && (w = findwin(ev->parent)))
     14 		target->parent = w;
     15 	if((w = findwin(ev->event)))
     16 		event_handle(w, reparent, ev);
     17 	if(ev->send_event && target)
     18 		event_handle(target, reparent, ev);
     19 }