1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:47: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

@ -127,8 +127,10 @@ void Compositor::compose()
{
auto& current_cursor = wm.active_cursor();
if (m_current_cursor != &current_cursor)
if (m_current_cursor != &current_cursor) {
change_cursor(&current_cursor);
m_invalidated_cursor = m_invalidated_any = true;
}
}
if (!m_invalidated_any) {