diff --git a/src/root-manager.scm b/src/root-manager.scm index 475da6e..ab433fa 100644 --- a/src/root-manager.scm +++ b/src/root-manager.scm @@ -149,6 +149,20 @@ (set-wm-state! dpy window (wm-state withdrawn) none) (if wm (wm-unmanage-window wm window)))) + ((client-message-event? xevent) + (let* ((p (client-message-event-property xevent)) + (type (property:type p)) + (data (property:data p)) + (window (client-message-event-window xevent)) + (wm (manager-of-window root-wm window)) + (iconic-state 3)) + (if (equal? (get-atom-name dpy type) "WM_CHANGE_STATE") + (if (and (eq? (property:format p) (property-format long)) + (not (null? data)) (= (car data) iconic-state)) + (if wm + (wm-iconify-window wm window) + (warn "unmanaged window wants to be iconified" + window)))))) ))) (define (do-split root-wm orientation new-wm)