Skip to content

Commit

Permalink
Fixed sf::Event::MouseEntered and sf::Event::MouseLeft on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGomila committed Mar 11, 2013
1 parent f5b9c7e commit 560b741
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/SFML/Window/Linux/WindowImplX11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,18 +817,24 @@ bool WindowImplX11::processEvent(XEvent windowEvent)
// Mouse entered
case EnterNotify :
{
Event event;
event.type = Event::MouseEntered;
pushEvent(event);
if (windowEvent.xcrossing.mode == NotifyNormal)
{
Event event;
event.type = Event::MouseEntered;
pushEvent(event);
}
break;
}

// Mouse left
case LeaveNotify :
{
Event event;
event.type = Event::MouseLeft;
pushEvent(event);
if (windowEvent.xcrossing.mode == NotifyNormal)
{
Event event;
event.type = Event::MouseLeft;
pushEvent(event);
}
break;
}
}
Expand Down

0 comments on commit 560b741

Please sign in to comment.