mirror of
https://github.com/polybar/polybar.git
synced 2024-11-25 13:55:47 -05:00
fix(controller): Check for connection error in eventloop
This commit is contained in:
parent
26c308cc19
commit
dd7967dede
1 changed files with 7 additions and 5 deletions
|
@ -335,14 +335,16 @@ class controller {
|
|||
|
||||
m_connection.flush();
|
||||
|
||||
while (true) {
|
||||
while (m_running) {
|
||||
shared_ptr<xcb_generic_event_t> evt;
|
||||
|
||||
if ((evt = m_connection.wait_for_event()))
|
||||
m_connection.dispatch_event(evt);
|
||||
|
||||
if (!m_running)
|
||||
if (m_connection.connection_has_error()) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((evt = m_connection.wait_for_event())) {
|
||||
m_connection.dispatch_event(evt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue