summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r--src/client/qwaylandwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 13a78d25d..75c5b2f9d 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -176,6 +176,9 @@ void QWaylandWindow::initWindow()
mShellSurface->setAppId(appId);
}
}
+ // the user may have already set some window properties, so make sure to send them out
+ for (auto it = m_properties.cbegin(); it != m_properties.cend(); ++it)
+ mShellSurface->sendProperty(it.key(), it.value());
}
// Enable high-dpi rendering. Scale() returns the screen scale factor and will
@@ -713,8 +716,10 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan
}
}
+#if QT_CONFIG(cursor)
if (e.type == QWaylandPointerEvent::Enter)
restoreMouseCursor(inputDevice);
+#endif
}
void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
@@ -726,7 +731,9 @@ void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
} else {
QWindowSystemInterface::handleLeaveEvent(window());
}
+#if QT_CONFIG(cursor)
restoreMouseCursor(inputDevice);
+#endif
}
bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods)
@@ -758,7 +765,9 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
globalTranslated.setX(globalTranslated.x() - marg.left());
globalTranslated.setY(globalTranslated.y() - marg.top());
if (!mMouseEventsInContentArea) {
+#if QT_CONFIG(cursor)
restoreMouseCursor(inputDevice);
+#endif
QWindowSystemInterface::handleEnterEvent(window());
}
@@ -784,6 +793,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
}
}
+#if QT_CONFIG(cursor)
void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor)
{
device->setCursor(cursor, mScreen);
@@ -793,6 +803,7 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
{
setMouseCursor(device, window()->cursor());
}
+#endif
void QWaylandWindow::requestActivateWindow()
{