summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-06-06 12:22:49 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2012-06-06 13:53:54 +0200
commit825db7e265e4e6b5bbab68aeb3e9673ba78f92e5 (patch)
tree4ad3118f50488d0822143e1c2d596e9f5a0b74c7 /src/plugins/platforms/wayland/qwaylandextendedoutput.cpp
parent077067bc8f68a3146430b941ea0f0daa61781f91 (diff)
Implemented orientationUpdateMask support in WaylandSurface.
Used to find out whether the client wants orientation updates. Change-Id: Ibefc98df7b346cbfe13cb021c932dab3d6c5d758 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandextendedoutput.cpp')
-rw-r--r--src/plugins/platforms/wayland/qwaylandextendedoutput.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp b/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp
index 96eb0ad4f..c0e011adf 100644
--- a/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp
+++ b/src/plugins/platforms/wayland/qwaylandextendedoutput.cpp
@@ -86,6 +86,20 @@ Qt::ScreenOrientation QWaylandExtendedOutput::currentOrientation() const
return m_orientation;
}
+void QWaylandExtendedOutput::setOrientationUpdateMask(Qt::ScreenOrientations orientations)
+{
+ int mask = 0;
+ if (orientations & Qt::PortraitOrientation)
+ mask |= WL_EXTENDED_OUTPUT_ROTATION_PORTRAITORIENTATION;
+ if (orientations & Qt::LandscapeOrientation)
+ mask |= WL_EXTENDED_OUTPUT_ROTATION_LANDSCAPEORIENTATION;
+ if (orientations & Qt::InvertedPortraitOrientation)
+ mask |= WL_EXTENDED_OUTPUT_ROTATION_INVERTEDPORTRAITORIENTATION;
+ if (orientations & Qt::InvertedLandscapeOrientation)
+ mask |= WL_EXTENDED_OUTPUT_ROTATION_INVERTEDLANDSCAPEORIENTATION;
+ wl_extended_output_set_orientation_update_mask(m_extended_output, mask);
+}
+
void QWaylandExtendedOutput::set_screen_rotation(void *data, wl_extended_output *wl_extended_output, int32_t rotation)
{
Q_UNUSED(wl_extended_output);