Bug 488967 - On Wayland, visual bell "invert screen" setting flashes the app window white instead of inverting the screen, which doesn't match the description in the UI
Summary: On Wayland, visual bell "invert screen" setting flashes the app window white ...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 6.1.0
Platform: Other Linux
: LO normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-22 11:08 UTC by Brodie Robertson
Modified: 2025-01-13 22:14 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.0
Sentry Crash Report:


Attachments
Application window flashing white (306.23 KB, image/png)
2024-06-22 11:08 UTC, Brodie Robertson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brodie Robertson 2024-06-22 11:08:47 UTC
Created attachment 170811 [details]
Application window flashing white

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
When the visual bell invert screen is enabled, the application window does not invert, instead it flashes white.

STEPS TO REPRODUCE
1. Enable invert screen under visual bell
2. Try an application that causes the bell (GIMP for example)
3. App does not invert, instead flashes white

OBSERVED RESULT
Application instead of inverting flashes white

EXPECTED RESULT
Application window should invert

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.1.0
KDE Frameworks Version:  6.3.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
Comment 1 David Edmundson 2024-06-25 16:26:23 UTC
Technically this isn't a kwin bug (right now) it's kaccess, another process which is doing some super legacy grabbing the screen and then rendering it over the top.  I assume the screen grab is failing.

When we support wayland system bell we'll need this to be a kwin effect anyway, so lets leave this here. Then we can either adjust kaccess to call into kwin to show the visualisation have kwin listen for the x11 bell.
Comment 2 Nate Graham 2024-06-26 00:02:12 UTC
We could also take the quick and easy ~~route to power~~ way out by changing the UI label in the KCM to reflect the status quo.

We do already have the KWin invert effect so maybe we could hook into that.
Comment 3 Nicolas Fella 2025-01-12 00:37:30 UTC
For Wayland native windows this works now with https://invent.kde.org/plasma/kwin/-/merge_requests/6064 and https://invent.kde.org/plasma/kwin/-/merge_requests/6166

For XWayland windows https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2378 is needed
Comment 4 Nicolas Fella 2025-01-13 14:36:28 UTC
Git commit 1011d1e32bc76c6dcd65b426edc103904f292f81 by Nicolas Fella.
Committed on 13/01/2025 at 14:23.
Pushed by nicolasfella into branch 'master'.

[kaccess] Use KWin to show visual bell

This works much better than trying it with a window, which is currently very broken with multiple or scaled displays

M  +0    -1    kaccess/CMakeLists.txt
M  +7    -115  kaccess/kaccess.cpp
M  +0    -27   kaccess/kaccess.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/1011d1e32bc76c6dcd65b426edc103904f292f81
Comment 5 Nicolas Fella 2025-01-13 22:13:19 UTC
Git commit e11c9292d1b18ccafbf16df7610757f5ca69e35f by Nicolas Fella.
Committed on 13/01/2025 at 22:12.
Pushed by nicolasfella into branch 'Plasma/6.3'.

[kaccess] Use KWin to show visual bell

This works much better than trying it with a window, which is currently very broken with multiple or scaled displays
(cherry picked from commit 1011d1e32bc76c6dcd65b426edc103904f292f81)

M  +0    -1    kaccess/CMakeLists.txt
M  +7    -115  kaccess/kaccess.cpp
M  +0    -27   kaccess/kaccess.h

https://invent.kde.org/plasma/plasma-desktop/-/commit/e11c9292d1b18ccafbf16df7610757f5ca69e35f