window-x11: Add back missing error trap

This was accidentally removed in 9f5087e.