diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-20 16:23:04 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-06-20 16:23:04 +0200 |
commit | 0c032ab862a77f7c7c7d506f4f4bb24ca250f716 (patch) | |
tree | b8a02020dc262d1c10f592f0270e45056f56622e /src/client | |
parent | 640d60c4de4137aa9093093fc047dccd37d7eb13 (diff) | |
parent | 79037e46eeb00e20c5f3bbe7d0de4b702af86884 (diff) |
Merge remote-tracking branch 'origin/5.13.0' into 5.13
Change-Id: I3b0e0899cfcd738ddf45b4211f86e1079d6e4988
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 39c02d962..7f6f01cd1 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -272,6 +272,10 @@ void QWaylandInputDevice::Pointer::updateCursorTheme() int pixelSize = cursorSize() * scale; auto *display = seat()->mQDisplay; mCursor.theme = display->loadCursorTheme(cursorThemeName(), pixelSize); + + if (!mCursor.theme) + return; // A warning has already been printed in loadCursorTheme + if (auto *arrow = mCursor.theme->cursorImage(Qt::ArrowCursor)) { int arrowPixelSize = qMax(arrow->width, arrow->height); // Not all cursor themes are square while (scale > 1 && arrowPixelSize / scale < cursorSize()) @@ -310,6 +314,9 @@ void QWaylandInputDevice::Pointer::updateCursor() if (!mCursor.theme || idealCursorScale() != mCursor.themeBufferScale) updateCursorTheme(); + if (!mCursor.theme) + return; + // Set from shape using theme if (struct ::wl_cursor_image *image = mCursor.theme->cursorImage(shape)) { struct wl_buffer *buffer = wl_cursor_image_get_buffer(image); |