summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 74efbfda4..94bfa88bc 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -166,16 +166,8 @@ QWaylandDisplay::~QWaylandDisplay(void)
void QWaylandDisplay::flushRequests()
{
- if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) < 0) {
- int ecode = wl_display_get_error(mDisplay);
- if ((ecode == EPIPE || ecode == ECONNRESET)) {
- // special case this to provide a nicer error
- qWarning("The Wayland connection broke. Did the Wayland compositor die?");
- } else {
- qErrnoWarning(ecode, "The Wayland connection experienced a fatal error");
- }
- ::exit(1);
- }
+ if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) < 0)
+ mEventThreadObject->checkErrorAndExit();
wl_display_flush(mDisplay);
}
@@ -183,16 +175,8 @@ void QWaylandDisplay::flushRequests()
void QWaylandDisplay::blockingReadEvents()
{
- if (wl_display_dispatch_queue(mDisplay, mEventQueue) < 0) {
- int ecode = wl_display_get_error(mDisplay);
- if ((ecode == EPIPE || ecode == ECONNRESET)) {
- // special case this to provide a nicer error
- qWarning("The Wayland connection broke. Did the Wayland compositor die?");
- } else {
- qErrnoWarning(ecode, "The Wayland connection experienced a fatal error");
- }
- ::exit(1);
- }
+ if (wl_display_dispatch_queue(mDisplay, mEventQueue) < 0)
+ mEventThreadObject->checkErrorAndExit();
}
QWaylandScreen *QWaylandDisplay::screenForOutput(struct wl_output *output) const