From 58a515c3aebc7f9afa73f460c7de33174fb4d832 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 10 Aug 2014 00:48:18 -0300 Subject: [PATCH] Win32: If we receive a WM_NCMOUSEMOVE message, we can generate a Event::MouseLeave if needed --- src/she/alleg4/she_alleg4.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/she/alleg4/she_alleg4.cpp b/src/she/alleg4/she_alleg4.cpp index add322771..56197463f 100644 --- a/src/she/alleg4/she_alleg4.cpp +++ b/src/she/alleg4/she_alleg4.cpp @@ -187,14 +187,16 @@ static LRESULT CALLBACK wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara break; } - case WM_MOUSELEAVE: { - display_has_mouse = false; + case WM_NCMOUSEMOVE: + case WM_MOUSELEAVE: + if (display_has_mouse) { + display_has_mouse = false; - Event ev; - ev.setType(Event::MouseLeave); - queue_event(ev); + Event ev; + ev.setType(Event::MouseLeave); + queue_event(ev); + } break; - } case WM_LBUTTONDOWN: case WM_RBUTTONDOWN: