diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2016-10-06 15:01:35 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2016-10-07 12:01:42 +0000 |
commit | 4a792b169ed3810d60ddb5f8fab576368fbd7c4f (patch) | |
tree | c76bc5c1a4d2f119d7f24c1944849d9f699aff61 /src/compositor/extensions/qwaylandwlshellintegration.cpp | |
parent | 985bd824ef70ea23484f70718b0f944533c4d076 (diff) |
Rename QWaylandSurface::throttlingView to primaryView
And make sure QWaylandWlShellIntegration and QWaylandXdgShellV5Integration only
send configure events if they have the primary view.
Also add a convenience, QWaylandView::isPrimary.
Change-Id: Ib3a9615f46c8c43897c7fac22f832d2581190c0a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/extensions/qwaylandwlshellintegration.cpp')
-rw-r--r-- | src/compositor/extensions/qwaylandwlshellintegration.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compositor/extensions/qwaylandwlshellintegration.cpp b/src/compositor/extensions/qwaylandwlshellintegration.cpp index 5aae77197..30e4704af 100644 --- a/src/compositor/extensions/qwaylandwlshellintegration.cpp +++ b/src/compositor/extensions/qwaylandwlshellintegration.cpp @@ -109,6 +109,9 @@ void WlShellIntegration::handleSetTransient(QWaylandSurface *parentSurface, cons void WlShellIntegration::handleSetMaximized(QWaylandOutput *output) { + if (!m_item->view()->isPrimary()) + return; + if (currentState == State::Maximized) return; @@ -130,6 +133,9 @@ void WlShellIntegration::handleSetFullScreen(QWaylandWlShellSurface::FullScreenM Q_UNUSED(method); Q_UNUSED(framerate); + if (!m_item->view()->isPrimary()) + return; + if (currentState == State::FullScreen) return; @@ -225,6 +231,9 @@ void WlShellIntegration::handleRedraw() void WlShellIntegration::adjustOffsetForNextFrame(const QPointF &offset) { + if (!m_item->view()->isPrimary()) + return; + float scaleFactor = m_item->view()->output()->scaleFactor(); QQuickItem *moveItem = m_item->moveItem(); moveItem->setPosition(moveItem->position() + offset * scaleFactor); |