General bug fixes (#142)
* Core/Bitset: Fix TestAll method * Fix documentation * Fix color and their conversions * Core/ByteStream: Fix return of Write * Fix compiler warnings * Math/Algorithm: Fix angle normalization * Math/BoundingVolume: Fix lerp * Math: Fix relation between Matrix4 and Quaternion * More tests * X11/Window: Fix mouse moved event generated when doing Mouse::SetPosition * Update ChangeLog * Should fix compilation on Windows * Should fix compilation on Windows Forgot to include array for Windows
This commit is contained in:
committed by
Jérôme Leclercq
parent
f2506ee918
commit
f991a9529e
@@ -58,7 +58,8 @@ namespace Nz
|
||||
m_parent(parent),
|
||||
m_smoothScrolling(false),
|
||||
m_mousePos(0, 0),
|
||||
m_keyRepeat(true)
|
||||
m_keyRepeat(true),
|
||||
m_lastSequence(0)
|
||||
{
|
||||
std::memset(&m_size_hints, 0, sizeof(m_size_hints));
|
||||
}
|
||||
@@ -1244,9 +1245,12 @@ namespace Nz
|
||||
{
|
||||
xcb_motion_notify_event_t* motionNotifyEvent = (xcb_motion_notify_event_t*)windowEvent;
|
||||
|
||||
if (m_mousePos.x == motionNotifyEvent->event_x && m_mousePos.y == motionNotifyEvent->event_y)
|
||||
// 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)
|
||||
break;
|
||||
|
||||
m_lastSequence = motionNotifyEvent->sequence;
|
||||
|
||||
WindowEvent event;
|
||||
event.type = Nz::WindowEventType_MouseMoved;
|
||||
event.mouseMove.deltaX = motionNotifyEvent->event_x - m_mousePos.x;
|
||||
|
||||
@@ -113,6 +113,7 @@ namespace Nz
|
||||
bool m_threadActive;
|
||||
Vector2i m_mousePos;
|
||||
bool m_keyRepeat;
|
||||
uint16_t m_lastSequence;
|
||||
|
||||
struct
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user