X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/2c6be7239f932121b9e4526b01b957fcefc8345a..ff957d1eaca73800e59f640351dce35e3ab67f9e:/event.c diff --git a/event.c b/event.c index ad4e271..1da9a6b 100644 --- a/event.c +++ b/event.c @@ -224,6 +224,19 @@ configurenotify(XEvent *e) { } } +static void +createnotify(XEvent *e) { + static XWindowAttributes wa; + XCreateWindowEvent *ev = &e->xcreatewindow; + + if(!XGetWindowAttributes(dpy, ev->window, &wa)) + return; + if(wa.override_redirect) + return; + if(!getclient(ev->window) && (wa.map_state == IsViewable)) + manage(ev->window, &wa); +} + static void destroynotify(XEvent *e) { Client *c; @@ -350,6 +363,7 @@ void (*handler[LASTEvent]) (XEvent *) = { [ButtonPress] = buttonpress, [ConfigureRequest] = configurerequest, [ConfigureNotify] = configurenotify, +/* [CreateNotify] = createnotify, */ [DestroyNotify] = destroynotify, [EnterNotify] = enternotify, [LeaveNotify] = leavenotify,