events: Protect against error from XGetWMHints()

2 jobs for !18 with master in 2 minutes and 57 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Build
passed #8649
build

00:01:12

 
  Distcheck
passed #8650
distcheck

00:01:45