| Summary: | Mouse click event not sent in fullscreen | ||
|---|---|---|---|
| Product: | SDL | Reporter: | kuon <kuon> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | cwalther, max |
| Version: | HG 2.0 | ||
| Hardware: | PowerPC | ||
| OS: | Mac OS X 10.4 (Intel) | ||
|
Description
kuon
2007-07-21 09:25:50 UTC
Any idea about why the mouseButtonDown event is not triggered in fullscreen? This is getting urgent. (as all bugs) No idea. I'm on vacation right now, but I'll look at it when I get back, if Christian hasn't solved it already. :) Don't worry, I will dig a hole into the code, to see what I can find. I was just wondering if anybody looked at it. Enjoy your vacation btw. I'm just starting to familiarize myself with SDL 1.3... I suspect that mouse click events are not caught by the window in fullscreen mode because they go to the shielding window put up by CGDisplayCapture() instead. A possible solution to this may be raising the Cocoa window above the shielding window, but the documentation for CGShieldingWindowLevel() says this is not recommended. What I would suggest is to handle the mouse events at the NSApplication level in Cocoa_PumpEvents() while in fullscreen - letting [NSApp sendEvent:] dispatch the event to the appropriate window is not needed in that case anyway. By the way, "In window mode, it is working as expected" is not quite correct, in my experience - I don't get right click events, only left and middle. I suspect they're swallowed by the NSView for contextual menu handling. If/when we introduce a custom NSView subclass as recently done in 1.2 for the cursor rects (r3291) that can probably be fixed by overriding rightMouseDown: to pass the event up the responder chain there. I think this is fixed in the latest SDL 1.3 snapshot: http://www.libsdl.org/tmp/SDL-1.3.zip Can you give it a try and let me know if this is fixed? Same as #465 I don't have the exact original code, but after a small test case, it's working, so I guess it can be closed too. Thanks! :) |