diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-02-22 10:52:54 +0100 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2012-02-23 09:19:43 +0100 |
commit | 2912e378393111677a985a0bd4353a06fbabc5ee (patch) | |
tree | 5c451476f46da144ab2a5e15ad46befed1753e66 /src/plugins/platforms/wayland/qwaylandwindow.cpp | |
parent | f9413889531c21b56e3b512c264c5dc9a85f8c74 (diff) |
Support ShowIsFullScreen in plugin and compositor.
Added way of controlling client side style hint ShowIsFullScreen from
compositor, and added support in plugin for the WindowFullScreen state.
Change-Id: I60efa5692b26e9a4079c3c2fb66eb72b67badd02
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandwindow.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandwindow.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 1142c31f3..b70860d55 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -147,7 +147,7 @@ void QWaylandWindow::attach(QWaylandBuffer *buffer) { mBuffer = buffer; - if (window()->visible()) { + if (window()->isVisible()) { wl_surface_attach(mSurface, mBuffer->buffer(),0,0); if (buffer) QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRect(QPoint(), geometry().size())); @@ -222,6 +222,22 @@ Qt::ScreenOrientation QWaylandWindow::requestWindowOrientation(Qt::ScreenOrienta return Qt::PrimaryOrientation; } +Qt::WindowState QWaylandWindow::setWindowState(Qt::WindowState state) +{ + if (state == Qt::WindowFullScreen || state == Qt::WindowMaximized) { + QScreen *screen = window()->screen(); + + QRect geometry = screen->mapBetween(window()->windowOrientation(), screen->primaryOrientation(), screen->geometry()); + setGeometry(geometry); + + QWindowSystemInterface::handleGeometryChange(window(), geometry); + + return state; + } + + return Qt::WindowNoState; +} + Qt::WindowFlags QWaylandWindow::setWindowFlags(Qt::WindowFlags flags) { return mExtendedWindow->setWindowFlags(flags); |