mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
CatDog: Fix wake-sleep "loop" when cursor is over right-top of head
Because re-evaluation of the hovered window may trigger sending a MouseMove event to a window we should only wake it if the mouse position actually has changed.
This commit is contained in:
parent
2677e24a99
commit
8d2d080923
Notes:
sideshowbarker
2024-07-18 22:01:32 +09:00
Author: https://github.com/tomuta
Commit: 8d2d080923
Pull-request: https://github.com/SerenityOS/serenity/pull/5467
1 changed files with 2 additions and 0 deletions
|
@ -137,6 +137,8 @@ public:
|
||||||
|
|
||||||
void mousemove_event(GUI::MouseEvent& event) override
|
void mousemove_event(GUI::MouseEvent& event) override
|
||||||
{
|
{
|
||||||
|
if (m_temp_pos == event.position())
|
||||||
|
return;
|
||||||
m_temp_pos = event.position();
|
m_temp_pos = event.position();
|
||||||
m_timer.start();
|
m_timer.start();
|
||||||
if (m_sleeping) {
|
if (m_sleeping) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue