From 560b741efb2c2bd19dad1f8423a6f4aa9cfcae3e Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Mon, 11 Mar 2013 23:18:52 +0100 Subject: [PATCH] Fixed sf::Event::MouseEntered and sf::Event::MouseLeft on Linux --- src/SFML/Window/Linux/WindowImplX11.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/SFML/Window/Linux/WindowImplX11.cpp b/src/SFML/Window/Linux/WindowImplX11.cpp index f2f8ec40a..08fbdc2f8 100644 --- a/src/SFML/Window/Linux/WindowImplX11.cpp +++ b/src/SFML/Window/Linux/WindowImplX11.cpp @@ -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; } }