diff options
Diffstat (limited to 'event.c')
| -rw-r--r-- | event.c | 14 |
1 files changed, 14 insertions, 0 deletions
| @@ -225,6 +225,19 @@ configurenotify(XEvent *e) { | |||
| 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 | ||
| 228 | destroynotify(XEvent *e) { | 241 | destroynotify(XEvent *e) { |
| 229 | Client *c; | 242 | Client *c; |
| 230 | XDestroyWindowEvent *ev = &e->xdestroywindow; | 243 | XDestroyWindowEvent *ev = &e->xdestroywindow; |
| @@ -350,6 +363,7 @@ void (*handler[LASTEvent]) (XEvent *) = { | |||
| 350 | [ButtonPress] = buttonpress, | 363 | [ButtonPress] = buttonpress, |
| 351 | [ConfigureRequest] = configurerequest, | 364 | [ConfigureRequest] = configurerequest, |
| 352 | [ConfigureNotify] = configurenotify, | 365 | [ConfigureNotify] = configurenotify, |
| 366 | [CreateNotify] = createnotify, | ||
| 353 | [DestroyNotify] = destroynotify, | 367 | [DestroyNotify] = destroynotify, |
| 354 | [EnterNotify] = enternotify, | 368 | [EnterNotify] = enternotify, |
| 355 | [LeaveNotify] = leavenotify, | 369 | [LeaveNotify] = leavenotify, |
