wait_for_unmap currently ignores its $window parameter, since X11::XCB doesn't provide $event->{window} for unmap events yet.
eval 'package foo; use strict;' enables strict within eval, it does not leak into the surrounding scope. Also fix various warnings/compile errors found due to now enabled strict and warnings.