Merge "Merge remote-tracking branch 'origin/5.13.0' into 5.13"
This commit is contained in:
commit
345f87d7da
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user