Clear message boxes in windowmanager cleanup (Fixes #1496)