From 48ef7fff232ed7b8614d05b1869f5bb228dd9112 Mon Sep 17 00:00:00 2001 From: DS Date: Tue, 24 Jun 2025 11:49:44 +0200 Subject: [PATCH] Revert "Detect mouse moving out of inventory slot" (#16281) This reverts commit 81d62d01d119a5d519b923b839ea4c08900e1d1f. --- src/gui/guiInventoryList.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/guiInventoryList.cpp b/src/gui/guiInventoryList.cpp index 5a96a4818..82e769102 100644 --- a/src/gui/guiInventoryList.cpp +++ b/src/gui/guiInventoryList.cpp @@ -203,10 +203,13 @@ bool GUIInventoryList::OnEvent(const SEvent &event) if (!hovered || hovered->getID() == -1) hovered = m_fs_menu; - IsVisible = was_visible; - bool ret = hovered->OnEvent(event); + // Set visible again *after* processing the event. Otherwise, hovered could + // be another GUIInventoryList, which will call this one again, resulting in + // an infinite loop. + IsVisible = was_visible; + return ret; }