diff options
author | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2017-01-13 20:19:17 +0900 |
---|---|---|
committer | Tasuku Suzuki <tasuku.suzuki@qt.io> | 2017-01-13 14:25:20 +0000 |
commit | cab7cb98d5b9530a3c265cc2436dd7d157e43f66 (patch) | |
tree | f17e25ec2bf58922fa83afc4e35c282fa0724a0e /src/plugins/decorations/bradient/main.cpp | |
parent | 479a487066484809ebdf3c2c16b3c87c72870483 (diff) |
Fix build without feature.cursor
Change-Id: If244e7ac58133ae6fbefacfa243d47fa210140be
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/plugins/decorations/bradient/main.cpp')
-rw-r--r-- | src/plugins/decorations/bradient/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp index f57b816e8..3928a9f10 100644 --- a/src/plugins/decorations/bradient/main.cpp +++ b/src/plugins/decorations/bradient/main.cpp @@ -372,7 +372,9 @@ bool QWaylandBradientDecoration::handleMouse(QWaylandInputDevice *inputDevice, c } else if (local.x() > window()->width() + margins().left()) { processMouseRight(inputDevice,local,b,mods); } else { +#if QT_CONFIG(cursor) waylandWindow()->restoreMouseCursor(inputDevice); +#endif setMouseButtons(b); return false; } @@ -409,19 +411,27 @@ void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevic if (local.y() <= margins().bottom()) { if (local.x() <= margins().left()) { //top left bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_LEFT,b); } else if (local.x() > window()->width() + margins().left()) { //top right bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_RIGHT,b); } else { //top reszie bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP,b); } } else { +#if QT_CONFIG(cursor) waylandWindow()->restoreMouseCursor(inputDevice); +#endif startMove(inputDevice,b); } @@ -432,15 +442,21 @@ void QWaylandBradientDecoration::processMouseBottom(QWaylandInputDevice *inputDe Q_UNUSED(mods); if (local.x() <= margins().left()) { //bottom left bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor); +#endif startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT,b); } else if (local.x() > window()->width() + margins().left()) { //bottom right bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor); +#endif startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT,b); } else { //bottom bit +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_BOTTOM,b); } } @@ -449,7 +465,9 @@ void QWaylandBradientDecoration::processMouseLeft(QWaylandInputDevice *inputDevi { Q_UNUSED(local); Q_UNUSED(mods); +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor); +#endif startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_LEFT,b); } @@ -457,7 +475,9 @@ void QWaylandBradientDecoration::processMouseRight(QWaylandInputDevice *inputDev { Q_UNUSED(local); Q_UNUSED(mods); +#if QT_CONFIG(cursor) waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor); +#endif startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_RIGHT,b); } |