From c55a222324a1782a4db3ecb495ef19fd0884d07a Mon Sep 17 00:00:00 2001 From: Lynix Date: Fri, 8 Mar 2013 12:17:42 +0100 Subject: [PATCH] Improved comments Former-commit-id: b387e7eb487de22cc06a9a526ad974fc0625879d --- src/Nazara/Utility/Win32/WindowImpl.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Nazara/Utility/Win32/WindowImpl.cpp b/src/Nazara/Utility/Win32/WindowImpl.cpp index 3a8a4c45a..77eb9efae 100644 --- a/src/Nazara/Utility/Win32/WindowImpl.cpp +++ b/src/Nazara/Utility/Win32/WindowImpl.cpp @@ -722,6 +722,7 @@ bool NzWindowImpl::HandleMessage(HWND window, UINT message, WPARAM wParam, LPARA { m_mouseInside = true; + // On créé un évènement pour être informé de la sortie de la fenêtre TRACKMOUSEEVENT mouseEvent; mouseEvent.cbSize = sizeof(TRACKMOUSEEVENT); mouseEvent.dwFlags = TME_LEAVE; @@ -748,7 +749,9 @@ bool NzWindowImpl::HandleMessage(HWND window, UINT message, WPARAM wParam, LPARA m_parent->PushEvent(event); break; } - else if (m_mousePos.x == currentX && m_mousePos.y == currentY) + + // Si la souris n'a pas bougé (Ou qu'on veut ignorer l'évènement) + if (m_mousePos.x == currentX && m_mousePos.y == currentY) break; NzEvent event; @@ -1113,7 +1116,7 @@ NzKeyboard::Key NzWindowImpl::ConvertVirtualKey(WPARAM key, LPARAM flags) case VK_VOLUME_UP: return NzKeyboard::Volume_Up; default: - return NzKeyboard::Key(NzKeyboard::Undefined); + return NzKeyboard::Undefined; } } @@ -1124,8 +1127,7 @@ void NzWindowImpl::WindowThread(HWND* handle, DWORD styleEx, const wchar_t* titl mutex->Lock(); condition->Signal(); - mutex->Unlock(); - // mutex et condition sont considérés invalides à partir d'ici + mutex->Unlock(); // mutex et condition sont considérés invalides à partir d'ici while (window->m_threadActive) window->ProcessEvents(true);