WindowServer: Stop menu applets from blocking wallpaper updates

The clock menu applet was causing pixel ghosting at some seemingly
arbitrary location on the desktop because the background paint logic
tries to avoid painting any part of the background that's covered by
an opaque window.

Since the code was using any_opaque_window_contains_rect() to check
this, we were not considering the window's *type*. (Menu applets are
still windows, but they are of the special type "MenuApplet" and do
not participate in normal compositing.)

The fix is to use for_each_visible_window_from_back_to_front() instead
of for_each_window() :^)

Fixes .
This commit is contained in:
Andreas Kling 2020-01-05 13:38:13 +01:00
parent c9507e8cbe
commit c410644c90
Notes: sideshowbarker 2024-07-19 10:20:38 +09:00

View file

@ -857,9 +857,7 @@ void WSWindowManager::clear_resize_candidate()
bool WSWindowManager::any_opaque_window_contains_rect(const Rect& rect)
{
bool found_containing_window = false;
for_each_window([&](WSWindow& window) {
if (!window.is_visible())
return IterationDecision::Continue;
for_each_visible_window_from_back_to_front([&](WSWindow& window) {
if (window.is_minimized())
return IterationDecision::Continue;
if (window.opacity() < 1.0f)