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.
sse-blitter-set-alpha
PeterN 2 years ago committed by GitHub
parent 1f04cc62d9
commit 69527abb6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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++;

Loading…
Cancel
Save