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

WindowServer: Re-evaluate the mouse cursor when alpha hit-testing

A window repaint may change the alpha value, resulting in a different
hit test outcome. In those cases, re-evaluate the cursor hit testing
after a window was painted, and update the cursor if needed.
This commit is contained in:
Tom 2021-02-21 11:56:59 -07:00 committed by Andreas Kling
parent bd830c2dfe
commit 2d29bfc89e
4 changed files with 60 additions and 5 deletions

View file

@ -189,7 +189,7 @@ public:
bool update_theme(String theme_path, String theme_name);
void set_hovered_window(Window*);
bool set_hovered_window(Window*);
void deliver_mouse_event(Window& window, MouseEvent& event, bool process_double_click);
void did_popup_a_menu(Badge<Menu>);
@ -234,6 +234,9 @@ public:
int compositor_icon_scale() const;
void reload_icon_bitmaps_after_scale_change(bool allow_hidpi_icons = true);
void reevaluate_hovered_window(Window* = nullptr);
Window* hovered_window() const { return m_hovered_window.ptr(); }
private:
NonnullRefPtr<Cursor> get_cursor(const String& name);