Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test fails with captured image size mismatch on upscaled displays under Plasma Wayland but not X11 #1035

Open
Cuperino opened this issue Jan 8, 2025 · 0 comments
Labels

Comments

@Cuperino
Copy link
Member

Cuperino commented Jan 8, 2025

The following comparisons from quickinspectortest fail in KDE Plasma if display scaling is at 1.5 when using Wayland, but not when using X11:

        QCOMPARE(img.width(), static_cast<int>(view()->width() * view()->devicePixelRatio()));
        QCOMPARE(img.height(), static_cast<int>(view()->height() * view()->devicePixelRatio()));

This appears to by a by-product of Wayland rendering apps at 2x to display them at 1.5. The tests error due to the following mismatch:

FAIL!  : QuickInspectorTest::testFetchingPreview() Compared values are not the same
   Actual   (img.width())                                                   : 200
   Expected (static_cast<int>(view()->width() * view()->devicePixelRatio())): 150
   Loc: [/home/javier/Software/GammaRay/tests/quickinspectortest.cpp(201)]

Both values should be matching at 150 pixels, making the captured image size unreliable.

mismatchedInWayland

Saving the captured image to disk also shows that regardless of the captured image's resolution, rendered contents only occupy original dimensions. That could be a bug in Qt, so I will report it upstream.

@Cuperino Cuperino added the bug label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant