diff options
Diffstat (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformwindow_qpa.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index 463267869c..b9506e7999 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -239,19 +239,44 @@ void QPlatformWindow::requestActivateWindow() } /*! - Set the orientation of the platform window's contents. + Handle changes to the orientation of the platform window's contents. This is a hint to the window manager in case it needs to display additional content like popups, dialogs, status bars, or similar in relation to the window. - \sa QWindow::setOrientation() + \sa QWindow::reportContentOrientationChange() */ -void QPlatformWindow::setOrientation(Qt::ScreenOrientation orientation) +void QPlatformWindow::handleContentOrientationChange(Qt::ScreenOrientation orientation) { Q_UNUSED(orientation); } +/*! + Request a different orientation of the platform window. + + This tells the window manager how the window wants to be rotated in order + to be displayed, and how input events should be translated. + + As an example, a portrait compositor might rotate the window by 90 degrees, + if the window is in landscape. It will also rotate input coordinates from + portrait to landscape such that top right in portrait gets mapped to top + left in landscape. + + If the implementation doesn't support the requested orientation it should + signal this by returning an actual supported orientation. + + If the implementation doesn't support rotating the window at all it should + return Qt::PrimaryOrientation, this is also the default value. + + \sa QWindow::requestWindowOrientation() +*/ +Qt::ScreenOrientation QPlatformWindow::requestWindowOrientation(Qt::ScreenOrientation orientation) +{ + Q_UNUSED(orientation); + return Qt::PrimaryOrientation; +} + bool QPlatformWindow::setKeyboardGrabEnabled(bool grab) { Q_UNUSED(grab); |