From 69527abb6fb0b90ac9a681681c64f3210878a188 Mon Sep 17 00:00:00 2001 From: PeterN Date: Thu, 22 Sep 2022 20:38:11 +0100 Subject: [PATCH] Fix 9aef7b8c: Don't dispatch hover event if already hovering. (#10042) This fixes the timed tooltip window being (invisibly) destroyed and reconstructed every frame. This also affects the unused OnHover() window event. --- src/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.cpp b/src/window.cpp index d07b597e40..96cc5b3b97 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2966,7 +2966,7 @@ void HandleMouseEvents() hover_pos = _cursor.pos; hover_time = std::chrono::steady_clock::now(); _mouse_hovering = false; - } else { + } else if (!_mouse_hovering) { if (std::chrono::steady_clock::now() > hover_time + std::chrono::milliseconds(_settings_client.gui.hover_delay_ms)) { click = MC_HOVER; _input_events_this_tick++;