void event_maprequest(XMapRequestEvent *ev) { Window *w; if((w = findwin(ev->parent))) event_handle(w, mapreq, ev); }
void event_leavenotify(XCrossingEvent *ev) { Window *w; if(!ev->send_event) event_xtime = ev->time; if((w = findwin(ev->window))) event_handle(w, leave, ev); }
void event_motionnotify(XMotionEvent *ev) { Window *w; if(!ev->send_event) event_xtime = ev->time; if((w = findwin(ev->window))) event_handle(w, motion, ev); }
static void buttonrelease(XEvent *e) { XButtonPressedEvent *ev; Window *w; ev = &e->xbutton; if((w = findwin(ev->window))) handle(w, bup, ev); }
void event_selectionrequest(XSelectionRequestEvent *ev) { Window *w; if(!ev->send_event) event_xtime = ev->time; if((w = findwin(ev->owner))) event_handle(w, selectionrequest, ev); }
static void mapnotify(XEvent *e) { XMapEvent *ev; Window *w; ev = &e->xmap; if((w = findwin(ev->window))) handle(w, map, ev); }
static void destroynotify(XEvent *e) { XDestroyWindowEvent *ev; Window *w; ev = &e->xdestroywindow; if((w = findwin(ev->window))) handle(w, destroy, ev); }
static void configurenotify(XEvent *e) { XConfigureEvent *ev; Window *w; ev = &e->xconfigure; if((w = findwin(ev->window))) handle(w, config, ev); }
static void propertynotify(XEvent *e) { XPropertyEvent *ev; Window *w; ev = &e->xproperty; xtime = ev->time; if((w = findwin(ev->window))) handle(w, property, ev); }
static void motionnotify(XEvent *e) { XMotionEvent *ev; Window *w; ev = &e->xmotion; xtime = ev->time; if((w = findwin(ev->window))) handle(w, motion, ev); }
static void unmapnotify(XEvent *e) { XUnmapEvent *ev; Window *w; ev = &e->xunmap; if((w = findwin(ev->window)) && w->parent && (ev->event == w->parent->xid)) { if(ev->send_event || w->unmapped-- == 0) handle(w, unmap, ev); } }
static void expose(XEvent *e) { XExposeEvent *ev; Window *w; ev = &e->xexpose; if(ev->count == 0) { if((w = findwin(ev->window))) handle(w, expose, ev); } }
static void buttonpress(XEvent *e) { XButtonPressedEvent *ev; Window *w; ev = &e->xbutton; if((w = findwin(ev->window))) handle(w, bdown, ev); else XAllowEvents(display, ReplayPointer, ev->time); }
void event_enternotify(XCrossingEvent *ev) { Window *w; if(!ev->send_event) event_xtime = ev->time; if(ev->mode != NotifyNormal) return; if((w = findwin(ev->window))) event_handle(w, enter, ev); }
static void enternotify(XEvent *e) { XCrossingEvent *ev; Window *w; ev = &e->xcrossing; xtime = ev->time; if(ev->mode != NotifyNormal) return; if((w = findwin(ev->window))) handle(w, enter, ev); }
static void focusout(XEvent *e) { XFocusChangeEvent *ev; Window *w; ev = &e->xfocus; if(!((ev->detail == NotifyNonlinear) ||(ev->detail == NotifyNonlinearVirtual) ||(ev->detail == NotifyVirtual) ||(ev->detail == NotifyInferior) ||(ev->detail == NotifyAncestor))) return; if((w = findwin(ev->window))) handle(w, focusout, ev); }
static void focusin(XEvent *e) { XFocusChangeEvent *ev; Window *w; ev = &e->xfocus; /* Yes, we're focusing in on nothing, here. */ if(ev->detail == NotifyDetailNone) { /* FIXME: Do something. */ return; } if(!((ev->detail == NotifyNonlinear) ||(ev->detail == NotifyNonlinearVirtual) ||(ev->detail == NotifyVirtual) ||(ev->detail == NotifyInferior) ||(ev->detail == NotifyAncestor))) return; if((ev->mode == NotifyWhileGrabbed)) return; if((w = findwin(ev->window))) handle(w, focusin, ev); }