Skip to content

Commit

Permalink
Fix cursor still visible after closing formspec while on HyperText (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrollo committed Apr 4, 2020
1 parent 307d737 commit 86a0e99
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/gui/guiHyperText.cpp
Expand Up @@ -1054,12 +1054,14 @@ void GUIHyperText::checkHover(s32 X, s32 Y)
}
}

#ifndef HAVE_TOUCHSCREENGUI
if (m_drawer.m_hovertag)
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
gui::ECI_HAND);
else
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
gui::ECI_NORMAL);
#endif
}

bool GUIHyperText::OnEvent(const SEvent &event)
Expand All @@ -1075,8 +1077,12 @@ bool GUIHyperText::OnEvent(const SEvent &event)
if (event.EventType == EET_GUI_EVENT &&
event.GUIEvent.EventType == EGET_ELEMENT_LEFT) {
m_drawer.m_hovertag = nullptr;
RenderingEngine::get_raw_device()->getCursorControl()->setActiveIcon(
gui::ECI_NORMAL);
#ifndef HAVE_TOUCHSCREENGUI
gui::ICursorControl *cursor_control =
RenderingEngine::get_raw_device()->getCursorControl();
if (cursor_control->isVisible())
cursor_control->setActiveIcon(gui::ECI_NORMAL);
#endif
}

if (event.EventType == EET_MOUSE_INPUT_EVENT) {
Expand Down

0 comments on commit 86a0e99

Please sign in to comment.