mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +00:00
WindowServer: Recompute occlusions when changing window's alpha channel
Fixes #4845
This commit is contained in:
parent
c2de22a635
commit
7e06afb822
3 changed files with 12 additions and 2 deletions
|
@ -68,7 +68,9 @@ public:
|
||||||
|
|
||||||
void set_double_buffering_enabled(bool);
|
void set_double_buffering_enabled(bool);
|
||||||
void set_has_alpha_channel(bool);
|
void set_has_alpha_channel(bool);
|
||||||
|
bool has_alpha_channel() const { return m_has_alpha_channel; }
|
||||||
void set_opacity(float);
|
void set_opacity(float);
|
||||||
|
float opacity() const { return m_opacity_when_windowless; }
|
||||||
|
|
||||||
WindowType window_type() const { return m_window_type; }
|
WindowType window_type() const { return m_window_type; }
|
||||||
void set_window_type(WindowType);
|
void set_window_type(WindowType);
|
||||||
|
|
|
@ -323,10 +323,18 @@ void Window::set_opacity(float opacity)
|
||||||
m_opacity = opacity;
|
m_opacity = opacity;
|
||||||
if (was_opaque != is_opaque())
|
if (was_opaque != is_opaque())
|
||||||
Compositor::the().invalidate_occlusions();
|
Compositor::the().invalidate_occlusions();
|
||||||
Compositor::the().invalidate_screen(frame().render_rect());
|
invalidate(false);
|
||||||
WindowManager::the().notify_opacity_changed(*this);
|
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)
|
void Window::set_occluded(bool occluded)
|
||||||
{
|
{
|
||||||
if (m_occluded == occluded)
|
if (m_occluded == occluded)
|
||||||
|
|
|
@ -219,7 +219,7 @@ public:
|
||||||
bool global_cursor_tracking() const { return m_global_cursor_tracking_enabled || m_automatic_cursor_tracking_enabled; }
|
bool global_cursor_tracking() const { return m_global_cursor_tracking_enabled || m_automatic_cursor_tracking_enabled; }
|
||||||
|
|
||||||
bool has_alpha_channel() const { return m_has_alpha_channel; }
|
bool has_alpha_channel() const { return m_has_alpha_channel; }
|
||||||
void set_has_alpha_channel(bool value) { m_has_alpha_channel = value; }
|
void set_has_alpha_channel(bool value);
|
||||||
|
|
||||||
Gfx::IntSize size_increment() const { return m_size_increment; }
|
Gfx::IntSize size_increment() const { return m_size_increment; }
|
||||||
void set_size_increment(const Gfx::IntSize& increment) { m_size_increment = increment; }
|
void set_size_increment(const Gfx::IntSize& increment) { m_size_increment = increment; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue