From 1b80ad5f029229237bf8167cd80084ef4e273ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 22 Nov 2017 10:26:58 +0100 Subject: [PATCH] Platform/Window: Revert wrong mouse position fix --- src/Nazara/Platform/X11/WindowImpl.cpp | 7 ++----- src/Nazara/Platform/X11/WindowImpl.hpp | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Nazara/Platform/X11/WindowImpl.cpp b/src/Nazara/Platform/X11/WindowImpl.cpp index 7afccf784..5b9061f04 100644 --- a/src/Nazara/Platform/X11/WindowImpl.cpp +++ b/src/Nazara/Platform/X11/WindowImpl.cpp @@ -58,8 +58,7 @@ namespace Nz m_parent(parent), m_smoothScrolling(false), m_mousePos(0, 0), - m_keyRepeat(true), - m_lastSequence(0) + m_keyRepeat(true) { std::memset(&m_size_hints, 0, sizeof(m_size_hints)); } @@ -1246,11 +1245,9 @@ namespace Nz xcb_motion_notify_event_t* motionNotifyEvent = (xcb_motion_notify_event_t*)windowEvent; // We use the sequence to determine whether the motion is linked to a Mouse::SetPosition - if ((m_mousePos.x == motionNotifyEvent->event_x && m_mousePos.y == motionNotifyEvent->event_y) || m_lastSequence == motionNotifyEvent->sequence) + if (m_mousePos.x == motionNotifyEvent->event_x && m_mousePos.y == motionNotifyEvent->event_y) break; - m_lastSequence = motionNotifyEvent->sequence; - WindowEvent event; event.type = Nz::WindowEventType_MouseMoved; event.mouseMove.deltaX = motionNotifyEvent->event_x - m_mousePos.x; diff --git a/src/Nazara/Platform/X11/WindowImpl.hpp b/src/Nazara/Platform/X11/WindowImpl.hpp index 425630e23..0bd286944 100644 --- a/src/Nazara/Platform/X11/WindowImpl.hpp +++ b/src/Nazara/Platform/X11/WindowImpl.hpp @@ -113,7 +113,6 @@ namespace Nz bool m_threadActive; Vector2i m_mousePos; bool m_keyRepeat; - uint16_t m_lastSequence; struct {