event.c
changeset 919 0ed962cd6b87
parent 916 b0dfa4fe6c63
child 920 7f8c81c4bc9a
equal deleted inserted replaced
918:7c556b28f1f6 919:0ed962cd6b87
   223 		lt->arrange();
   223 		lt->arrange();
   224 	}
   224 	}
   225 }
   225 }
   226 
   226 
   227 static void
   227 static void
   228 createnotify(XEvent *e) {
       
   229 	static XWindowAttributes wa;
       
   230 	XCreateWindowEvent *ev = &e->xcreatewindow;
       
   231 
       
   232 	if(!XGetWindowAttributes(dpy, ev->window, &wa))
       
   233 		return;
       
   234 	if(wa.override_redirect)
       
   235 		return;
       
   236 	if(!getclient(ev->window) && (wa.map_state == IsViewable))
       
   237 		manage(ev->window, &wa);
       
   238 }
       
   239 
       
   240 static void
       
   241 destroynotify(XEvent *e) {
   228 destroynotify(XEvent *e) {
   242 	Client *c;
   229 	Client *c;
   243 	XDestroyWindowEvent *ev = &e->xdestroywindow;
   230 	XDestroyWindowEvent *ev = &e->xdestroywindow;
   244 
   231 
   245 	if((c = getclient(ev->window)))
   232 	if((c = getclient(ev->window)))
   361 
   348 
   362 void (*handler[LASTEvent]) (XEvent *) = {
   349 void (*handler[LASTEvent]) (XEvent *) = {
   363 	[ButtonPress] = buttonpress,
   350 	[ButtonPress] = buttonpress,
   364 	[ConfigureRequest] = configurerequest,
   351 	[ConfigureRequest] = configurerequest,
   365 	[ConfigureNotify] = configurenotify,
   352 	[ConfigureNotify] = configurenotify,
   366 /*	[CreateNotify] = createnotify, */
       
   367 	[DestroyNotify] = destroynotify,
   353 	[DestroyNotify] = destroynotify,
   368 	[EnterNotify] = enternotify,
   354 	[EnterNotify] = enternotify,
   369 	[LeaveNotify] = leavenotify,
   355 	[LeaveNotify] = leavenotify,
   370 	[Expose] = expose,
   356 	[Expose] = expose,
   371 	[KeyPress] = keypress,
   357 	[KeyPress] = keypress,