Skip to content

Commit d91aeb8

Browse files
committed
Fix GUI slider, caret, and selectors bug
1 parent c4fe546 commit d91aeb8

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Client/gui/CGUI_Impl.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,11 +1410,22 @@ bool CGUI_Impl::Event_RedrawRequested(const CEGUI::EventArgs& Args)
14101410
{
14111411
const CEGUI::WindowEventArgs& e = reinterpret_cast<const CEGUI::WindowEventArgs&>(Args);
14121412

1413-
CGUIElement* pElement = reinterpret_cast<CGUIElement*>((e.window)->getUserData());
1413+
// Get the master window (walks up parent hierarchy for child widgets)
1414+
CEGUI::Window* pMasterWindow = GetMasterWindow(e.window);
1415+
1416+
CGUIElement* pElement = reinterpret_cast<CGUIElement*>(pMasterWindow->getUserData());
14141417
if (pElement)
1418+
{
1419+
// Add to queue for crash-protected deferred redraw
14151420
AddToRedrawQueue(pElement);
1421+
// Also redraw immediately for responsiveness
1422+
pElement->ForceRedraw();
1423+
}
14161424
else
1417-
e.window->forceRedraw();
1425+
{
1426+
// Fallback: if no data found, force immediate redraw
1427+
pMasterWindow->forceRedraw();
1428+
}
14181429

14191430
return true;
14201431
}

0 commit comments

Comments
 (0)