diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-25 12:12:45 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-01-25 12:19:40 +0100 |
commit | 44e3a9d321190f2958e1a1bdfa7f840e56355279 (patch) | |
tree | 4d167e9d0cfcb59eb6e2dd5ed4f55981627e9339 /src/client/qwaylandwindow.cpp | |
parent | e26696524ceb58f4fe0cb7202d873240b6a9478d (diff) | |
parent | f72d63866d3f5820865fcd309b649dc9932518ee (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
.qmake.conf
examples/wayland/custom-extension/client-common/main.cpp
src/client/qwaylandwlshellintegration_p.h
src/client/qwaylandxdgshellintegration_p.h
src/compositor/compositor_api/qwaylandquickoutput.h
src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-rw-r--r-- | src/client/qwaylandwindow.cpp | 11 |
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() { |