Merge "Merge remote-tracking branch 'origin/5.13' into dev"
This commit is contained in:
commit
a582ec32d1
@ -113,7 +113,10 @@ void QWaylandDataDevice::startDrag(QMimeData *mimeData, QWaylandWindow *icon)
|
|||||||
if (!origin)
|
if (!origin)
|
||||||
origin = seat->touchFocus();
|
origin = seat->touchFocus();
|
||||||
|
|
||||||
|
if (origin)
|
||||||
start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial());
|
start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial());
|
||||||
|
else
|
||||||
|
qCDebug(lcQpaWayland) << "Couldn't start a drag because the origin window could not be found.";
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandDataDevice::cancelDrag()
|
void QWaylandDataDevice::cancelDrag()
|
||||||
|
@ -279,6 +279,10 @@ void QWaylandInputDevice::Pointer::updateCursorTheme()
|
|||||||
int pixelSize = cursorSize() * scale;
|
int pixelSize = cursorSize() * scale;
|
||||||
auto *display = seat()->mQDisplay;
|
auto *display = seat()->mQDisplay;
|
||||||
mCursor.theme = display->loadCursorTheme(cursorThemeName(), pixelSize);
|
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)) {
|
if (auto *arrow = mCursor.theme->cursorImage(Qt::ArrowCursor)) {
|
||||||
int arrowPixelSize = qMax(arrow->width, arrow->height); // Not all cursor themes are square
|
int arrowPixelSize = qMax(arrow->width, arrow->height); // Not all cursor themes are square
|
||||||
while (scale > 1 && arrowPixelSize / scale < cursorSize())
|
while (scale > 1 && arrowPixelSize / scale < cursorSize())
|
||||||
@ -317,6 +321,9 @@ void QWaylandInputDevice::Pointer::updateCursor()
|
|||||||
if (!mCursor.theme || idealCursorScale() != mCursor.themeBufferScale)
|
if (!mCursor.theme || idealCursorScale() != mCursor.themeBufferScale)
|
||||||
updateCursorTheme();
|
updateCursorTheme();
|
||||||
|
|
||||||
|
if (!mCursor.theme)
|
||||||
|
return;
|
||||||
|
|
||||||
// Set from shape using theme
|
// Set from shape using theme
|
||||||
uint time = seat()->mCursor.animationTimer.elapsed();
|
uint time = seat()->mCursor.animationTimer.elapsed();
|
||||||
if (struct ::wl_cursor_image *image = mCursor.theme->cursorImage(shape, time)) {
|
if (struct ::wl_cursor_image *image = mCursor.theme->cursorImage(shape, time)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user