diff options
author | David Edmundson <davidedmundson@kde.org> | 2024-03-14 09:09:46 +0000 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2024-03-14 09:24:45 +0000 |
commit | 97b9b165c45832dc0d82f60d04a222296ef48ff6 (patch) | |
tree | fc981a282e18c0f777f23183938d0b300334904d | |
parent | 19758eb4093e8d60c69f75174afb7457490e2332 (diff) |
client: Only use viewport when fractional scaling is in use
Either viewport or wl_buffer.set_scale can be used to notify the
compositor that the client has scaled it's contents, with viewport being
more flexible and a requirement for fractional scaling.
Unfortunately Gnome before 36 announces viewport support, but it does
not work correctly. This patch workarounds that by only using the
viewporter when we're using fractional scaling otherwise continue using
the legacy path.
Fixes: QTBUG-122412
Pick-to: 6.7 6.6
Change-Id: I9a01d9456ce91735051f8f53fb4b72add6961fcb
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: David Redondo <qt@david-redondo.de>
-rw-r--r-- | src/client/qwaylandwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 84b73c0a4..215193a7b 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -186,7 +186,9 @@ void QWaylandWindow::initWindow() } } - if (display()->viewporter()) { + // The fractional scale manager check is needed to work around Gnome < 36 where viewports don't work + // Right now viewports are only necessary when a fractional scale manager is used + if (display()->viewporter() && display()->fractionalScaleManager()) { mViewport.reset(new QWaylandViewport(display()->createViewport(this))); } |