| Summary: | Two SDL_ACTIVEEVENT SDL_APPMOUSEFOCUS events precede each SDL_MOUSEBUTTONDOWN | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Kalle Olavi Niemitalo <kon> |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.14 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| URL: | https://savannah.nongnu.org/bugs/index.php?27982 | ||
| Attachments: | event trace with xtrace --relative-timestamps and Bos Wars patched to display SDL events | ||
|
Description
Kalle Olavi Niemitalo
2010-01-17 07:37:10 UTC
Created attachment 479 [details]
event trace with xtrace --relative-timestamps and Bos Wars patched to display SDL events
It seems this is caused by the Metacity 2.28.0 window manager grabbing mouse events. Metacity then calls XAllowEvents with ReplayPointer, letting the event through to SDL in Bos Wars; but the grab has already caused the X server to report LeaveNotify and EnterNotify, which then cause SDL to report to Bos Wars that it lost and regained the mouse focus. The Openbox 3.4.10 window manager causes the same problem; IceWm 1.3.6 however doesn't. Because the LeaveNotify events received by SDL do indicate that the application isn't going to receive mouse events, I suppose SDL is right to report loss of mouse focus to the application. The EnterNotify then soon follows but I suppose that can be arbitrarily delayed, in particular if the window manager is not running on the same host as the X server. (In which case, the mouse events to the application will also be delayed, so having a window manager grab the mouse like that seems a bad idea.) So I don't how to change SDL not to report those events while remaining correct. I'm thus resolving my own bug report as INVALID. Thanks for the info! |