mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
WindowServer: Add support for alpha channel based hit testing
This enables implementing non-rectangular window shapes, including non-rectangular window frames.
This commit is contained in:
parent
b3f0a5c917
commit
d590e0c946
Notes:
sideshowbarker
2024-07-18 22:13:34 +09:00
Author: https://github.com/tomuta
Commit: d590e0c946
Pull-request: https://github.com/SerenityOS/serenity/pull/5355
Reviewed-by: https://github.com/awesomekling
12 changed files with 107 additions and 12 deletions
|
@ -72,6 +72,9 @@ public:
|
|||
void set_opacity(float);
|
||||
float opacity() const { return m_opacity_when_windowless; }
|
||||
|
||||
void set_alpha_hit_threshold(float);
|
||||
float alpha_hit_threshold() const { return m_alpha_hit_threshold; }
|
||||
|
||||
WindowType window_type() const { return m_window_type; }
|
||||
void set_window_type(WindowType);
|
||||
|
||||
|
@ -238,6 +241,7 @@ private:
|
|||
RefPtr<Gfx::Bitmap> m_custom_cursor;
|
||||
int m_window_id { 0 };
|
||||
float m_opacity_when_windowless { 1.0f };
|
||||
float m_alpha_hit_threshold { 0.0f };
|
||||
RefPtr<Widget> m_main_widget;
|
||||
WeakPtr<Widget> m_focused_widget;
|
||||
WeakPtr<Widget> m_global_cursor_tracking_widget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue