|
|
| [A5/OSX] [A5/OSX] ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY not sent? |
|
X-G
Member #856
December 2000
|
Simple question. No event for ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY seems to be sent when the mouse is moved out of the window while still retaining focus on the window. Switching applications with Exposé or Cmd+Tab does result in the event being sent if the mouse is inside the window when I hit the respective keys (or another window is forcefully brought to the front for some other reason), but not if the mouse is outside the window at the time -- which also means that simply clicking on another window will not result in any events. ALLEGRO_EVENT_MOUSE_ENTER_DISPLAY and other mouse-related events work just fine, just not that particular one. EDIT: Whoops, a little duplication in the title there. -- |
|
Evert
Member #794
November 2000
|
Try the following patch:
Index: ../src/macosx/qzmouse.m
===================================================================
--- ../src/macosx/qzmouse.m (revision 14234)
+++ ../src/macosx/qzmouse.m (working copy)
@@ -161,7 +161,7 @@
osx_mouse.warped = FALSE;
}
_al_event_source_lock(&osx_mouse.parent.es);
- if ((within||b_change) && _al_event_source_needs_to_generate_event(&osx_mouse.parent.es))
+ if ((within||b_change || type == ALLEGRO_EVENT_MOUSE_LEAVE_DISPLAY) && _al_event_source_needs_to_generate_event(&osx_mouse.parent.es))
{
ALLEGRO_EVENT new_event;
ALLEGRO_MOUSE_EVENT* mouse_event = &new_event.mouse;
|
|
Peter Wang
Member #23
April 2000
|
So does it work?
|
|
Evert
Member #794
November 2000
|
Does for me. |
|
|