[Spectacle] [Bug 524305] Window Under Cursor captures Plasma desktop as fully transparent with fractional scaling on Wayland

"Simon Zevnik" <[email protected]>
Newsgroups gmane.comp.kde.devel.bugs
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=524305

--- Comment #1 from Simon Zevnik <[email protected]> ---
I did some additional debugging on Fedora 44 / Plasma 6.7.4 / Wayland with
fractional scaling at 1.2.

A few useful findings:

queryWindowInfo() shows that when clicking the empty Plasma desktop, KWin
selects the same plasmashell Desktop window at scale 1.0 and 1.2. The UUID,
PID, window type and layer are identical; only the logical geometry changes
from 2560×1440 to 2133×1200.
A direct call to org.kde.KWin.ScreenShot2.CaptureInteractive(kind=Window) at
scale 1.2 can successfully capture the same desktop as a fully opaque 2560×1440
image. This suggests fractional scaling alone is not sufficient to trigger the
bug.
I also reproduced Spectacle's exact pipe-reading path (QImage + DPR +
QDataStream::readRawData). When KWin returns a correct buffer, Spectacle
receives all expected bytes and the image remains fully opaque. I have not
found evidence that Spectacle corrupts a correct buffer after receiving it.
The problem appears to be state/timing dependent. Instrumentation often makes
the bug disappear, which suggests a possible race/lifecycle issue around window
selection or capture.
In one separate transparent capture, KWin itself returned a completely
transparent raw ARGB buffer, so at least in that case the transparency was
already present before PNG encoding. However, that capture was not the exact
CaptureInteractive(Window) reproduction path, so I do not consider it proof of
the root cause of this bug.

I also built KWin 6.7.4 locally and created an integration test for desktop
screenshots at scale 1.0 and 1.2. The isolated test does not reproduce the
transparent result, including with a Plasma layer-shell desktop and dmabuf
buffer.

I can provide the test code, raw buffers, metadata and D-Bus logs if they would
be useful.

-- 
You are receiving this mail because:
You are watching all bug changes.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.