LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.63k stars 194 forks source link

Add break from main loop when X conn has error #95

Closed jvvv closed 9 years ago

jvvv commented 9 years ago

Errors covered by xcb_connection_has_error() are said to be unrecoverable, so the connection has been closed if it returns true. I have looked at the source for xcb_connection_has _error and the overall cost of this check is negligible. This should ensure bar shuts down when the connection is closed and take care of https://github.com/LemonBoy/bar/issues/94.

LemonBoy commented 9 years ago

Great as usual :) Thanks for the PR!