diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-09-03 03:01:35 +0200 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-09-03 07:24:14 +0200 |
commit | 9f02bfedfe3b6b0b19d7c7a684a33b7544c84111 (patch) | |
tree | 89ecc4e3c982338363540384aa895f6949630e89 /src/client/qwaylanddisplay.cpp | |
parent | f3668f88ccad6341280fbe2ca493562f80e76955 (diff) | |
parent | cd2c3a8916a9cc7ab31f6e18e6f1510a048f4ace (diff) | |
download | qtwayland-9f02bfedfe3b6b0b19d7c7a684a33b7544c84111.tar.gz |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
src/client/qwaylandinputdevice.cpp
src/client/qwaylandwindow.cpp
Change-Id: Ifd64debc484197829d2fe412afa98c29b382efa5
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index cb4f190a..a17e8917 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -189,9 +189,9 @@ void QWaylandDisplay::checkError() const 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?"); + qFatal("The Wayland connection broke. Did the Wayland compositor die?"); } else { - qErrnoWarning(ecode, "The Wayland connection experienced a fatal error"); + qFatal("The Wayland connection experienced a fatal error: %s", strerror(ecode)); } } @@ -201,25 +201,16 @@ void QWaylandDisplay::flushRequests() wl_display_read_events(mDisplay); } - if (wl_display_dispatch_pending(mDisplay) < 0) { + if (wl_display_dispatch_pending(mDisplay) < 0) checkError(); - exitWithError(); - } wl_display_flush(mDisplay); } void QWaylandDisplay::blockingReadEvents() { - if (wl_display_dispatch(mDisplay) < 0) { + if (wl_display_dispatch(mDisplay) < 0) checkError(); - exitWithError(); - } -} - -void QWaylandDisplay::exitWithError() -{ - ::exit(1); } wl_event_queue *QWaylandDisplay::createEventQueue() @@ -248,10 +239,9 @@ void QWaylandDisplay::dispatchQueueWhile(wl_event_queue *queue, std::function<bo else wl_display_cancel_read(mDisplay); - if (wl_display_dispatch_queue_pending(mDisplay, queue) < 0) { + if (wl_display_dispatch_queue_pending(mDisplay, queue) < 0) checkError(); - exitWithError(); - } + if (!condition()) break; } |