Stop Xwayland server when X11 connection breaks
There is no point for processing X11 events if the connection has been shut down due to a fatal error.
This commit is contained in:
parent
5aef9da884
commit
7ec93493c9
1 changed files with 7 additions and 0 deletions
|
@ -190,6 +190,13 @@ void Xwayland::dispatchEvents()
|
|||
return;
|
||||
}
|
||||
|
||||
const int connectionError = xcb_connection_has_error(connection);
|
||||
if (connectionError) {
|
||||
qCWarning(KWIN_XWL, "The X11 connection broke (error %d)", connectionError);
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
|
||||
while (xcb_generic_event_t *event = xcb_poll_for_event(connection)) {
|
||||
if (m_dataBridge->filterEvent(event)) {
|
||||
free(event);
|
||||
|
|
Loading…
Reference in a new issue