diff --git a/src/button.cxx b/src/button.cxx index d31ca01..8f51580 100644 --- a/src/button.cxx +++ b/src/button.cxx @@ -275,7 +275,15 @@ CButton::TreatEvent (const SDL_Event & event) pos.x = event.button.x; pos.y = event.button.y; if (MouseUp (pos)) - return false; // (*) + { + /* Simulate a mouse move in order to restore the mouse hover state. */ + SDL_Event ev = {0}; + ev.type = SDL_MOUSEMOTION; + ev.motion.x = pos.x; + ev.motion.y = pos.y; + SDL_PushEvent (&ev); + return false; + } // (*) break; }