Merge "Merge remote-tracking branch 'origin/5.13' into dev"

This commit is contained in:
Liang Qi 2019-08-13 09:20:59 +02:00
commit cd834c5dcb

View File

@ -602,7 +602,7 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
invalidateFocus(); invalidateFocus();
} }
mFocus = window->waylandSurface(); mFocus = window->waylandSurface();
connect(mFocus, &QObject::destroyed, this, &Pointer::handleFocusDestroyed); connect(mFocus.data(), &QObject::destroyed, this, &Pointer::handleFocusDestroyed);
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy)); mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
mGlobalPos = window->window()->mapToGlobal(mSurfacePos.toPoint()); mGlobalPos = window->window()->mapToGlobal(mSurfacePos.toPoint());
@ -774,7 +774,7 @@ void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time
void QWaylandInputDevice::Pointer::invalidateFocus() void QWaylandInputDevice::Pointer::invalidateFocus()
{ {
disconnect(mFocus, &QObject::destroyed, this, &Pointer::handleFocusDestroyed); disconnect(mFocus.data(), &QObject::destroyed, this, &Pointer::handleFocusDestroyed);
mFocus = nullptr; mFocus = nullptr;
mEnterSerial = 0; mEnterSerial = 0;
} }