Fixed sf::Event::MouseEntered and sf::Event::MouseLeft on Linux

This commit is contained in:
Laurent Gomila 2013-03-11 23:18:52 +01:00
parent f5b9c7e216
commit 560b741efb

View File

@ -816,19 +816,25 @@ bool WindowImplX11::processEvent(XEvent windowEvent)
// Mouse entered
case EnterNotify :
{
if (windowEvent.xcrossing.mode == NotifyNormal)
{
Event event;
event.type = Event::MouseEntered;
pushEvent(event);
}
break;
}
// Mouse left
case LeaveNotify :
{
if (windowEvent.xcrossing.mode == NotifyNormal)
{
Event event;
event.type = Event::MouseLeft;
pushEvent(event);
}
break;
}
}