1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

WindowServer: Recompute occlusions when changing window's alpha channel

Fixes #4845
This commit is contained in:
Tom 2021-02-11 17:32:03 -07:00 committed by Andreas Kling
parent c2de22a635
commit 7e06afb822
3 changed files with 12 additions and 2 deletions

View file

@ -323,10 +323,18 @@ void Window::set_opacity(float opacity)
m_opacity = opacity;
if (was_opaque != is_opaque())
Compositor::the().invalidate_occlusions();
Compositor::the().invalidate_screen(frame().render_rect());
invalidate(false);
WindowManager::the().notify_opacity_changed(*this);
}
void Window::set_has_alpha_channel(bool value)
{
if (m_has_alpha_channel == value)
return;
m_has_alpha_channel = value;
Compositor::the().invalidate_occlusions();
}
void Window::set_occluded(bool occluded)
{
if (m_occluded == occluded)