summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandextendedsurface.cpp
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2014-03-03 17:24:26 +0200
committerPier Luigi Fiorini <pierluigi.fiorini@gmail.com>2014-07-31 19:06:30 +0200
commit00d7933816d37f5e7bb8d61624c4d4ca38bb014f (patch)
tree9823c47e7b81ead86cacd15643baac62ff8d8f60 /src/client/qwaylandextendedsurface.cpp
parentd6fd07906286562c6fa3103aa671f6166d99db90 (diff)
Use wayland core interfaces to signal output rotation
The wl_output interface has an event for signaling the rotation of the display, so use that instead of our own thing. Change-Id: I8a017d575ee456a7a81649e19a015085fb784805 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/client/qwaylandextendedsurface.cpp')
-rw-r--r--src/client/qwaylandextendedsurface.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/qwaylandextendedsurface.cpp b/src/client/qwaylandextendedsurface.cpp
index fe2804162..3155ca6b0 100644
--- a/src/client/qwaylandextendedsurface.cpp
+++ b/src/client/qwaylandextendedsurface.cpp
@@ -94,6 +94,22 @@ void QWaylandExtendedSurface::setContentOrientation(Qt::ScreenOrientation orient
set_content_orientation(waylandRotationFromScreenOrientation(orientation));
}
+void QWaylandExtendedSurface::setContentOrientationMask(Qt::ScreenOrientations mask)
+{
+ int32_t wlmask = 0;
+ if (mask & Qt::PrimaryOrientation)
+ wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_PRIMARYORIENTATION;
+ if (mask & Qt::PortraitOrientation)
+ wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_PORTRAITORIENTATION;
+ if (mask & Qt::LandscapeOrientation)
+ wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_LANDSCAPEORIENTATION;
+ if (mask & Qt::InvertedPortraitOrientation)
+ wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDPORTRAITORIENTATION;
+ if (mask & Qt::InvertedLandscapeOrientation)
+ wlmask |= QT_EXTENDED_SURFACE_ORIENTATION_INVERTEDLANDSCAPEORIENTATION;
+ set_content_orientation_mask(wlmask);
+}
+
QVariantMap QWaylandExtendedSurface::properties() const
{
return m_properties;