xcb: call qGuiApp->exit() on xcb connection error

Fixes: QTBUG-130741
Pick-to: 6.9 6.8 6.5
Change-Id: I67eff8e58d4a4a8d18fb49699111f72ed9100480
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Liang Qi 2025-02-03 14:46:20 +01:00 committed by Tor Arne Vestbø
parent 9854482835
commit facf2c1770

View File

@ -1067,7 +1067,8 @@ void QXcbConnection::processXcbEvents(QEventLoop::ProcessEventsFlags flags)
int connection_error = xcb_connection_has_error(xcb_connection());
if (connection_error) {
qWarning("The X11 connection broke (error %d). Did the X11 server die?", connection_error);
exit(1);
qGuiApp->exit(connection_error);
return;
}
m_eventQueue->flushBufferedEvents();