diff options
author | Vlad Zahorodnii <vlad.zahorodnii@kde.org> | 2024-05-22 12:13:49 +0300 |
---|---|---|
committer | Vlad Zahorodnii <vlad.zahorodnii@kde.org> | 2024-05-24 14:23:57 +0300 |
commit | ecc6e45c2f93ac369febc2c02ab2465f04218a8f (patch) | |
tree | 0501e299dc63abfdb5acd416106348cc65d6e7d4 /src/client/qwaylanddisplay.cpp | |
parent | 911b66dbd66dbad96e5f07a8b9b7ca56cf3b81b9 (diff) |
QWaylandWindow initializes mScale to the scale factor of the currently
assigned screen when it's constructed. However, it doesn't keep track of
subsequent screen changes that may occur afterwards before
QWindow::setVisible(true). For example
window.setScreen(foo);
window.create();
window.setScreen(bar);
window.show();
In that case, the value of mScale will correspond to the scale factor
of output "foo" when show() is called.
A better place to initialize mScale is when the show() function is
called. Furthermore, since there's wl_surface.preferred_buffer_scale and
fractional_scale_v1.preferred_scale events, QWaylandWindow could stop
guessing the scale factor and rely on the compositor telling us that
information. However, it's important that the compositor sends the
preferred buffer scale before the first configure event arrives.
Fixes: QTBUG-124839
Pick-to: 6.7
Change-Id: I842aaa352d9cb1e53158f64f2ec0cd3734f7ecf3
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
0 files changed, 0 insertions, 0 deletions