| Summary: | SDL_MOUSEBUTTONUP event triggers out of the SDL window | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Amit Jain <amit.jain83> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | REOPENED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus, p.sangra |
| Version: | 2.0.3 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
|
Description
Amit Jain
2015-08-11 05:37:23 UTC
My understanding is that this has to happen, or apps may think the mouse button was held down forever. --ryan. (In reply to Ryan C. Gordon from comment #1) > My understanding is that this has to happen, or apps may think the mouse > button was held down forever. > > --ryan. Hi Ryan, As per my analysis current behavior of SDL_MOUSEBUTTONUP event in Linux & Windows : Linux: 1. Press the left mouse button with inside SDL window and keep the button pressed. 2. Move the mouse cursor outside of SDL window and release it. 3. SDL_MOUSEBUTTONUP event comes to application at the moment we release button. Windows: 1. Press the left mouse button with inside SDL window and keep the button pressed. 2. Move the mouse cursor outside of SDL window and release it. 3. SDL_MOUSEBUTTONUP event doesn't come(It comes when cursor moves inside the SDL window) In linux case, application is knowing button released event at the same time when it is released. In windows case, application is not knowing when button is released. It knows only mouse moves inside the window. Behaviour of Release events should be consistent in both the platforms. (In reply to Pankaj from comment #2) > In linux case, application is knowing button released event at the same time > when it is released. > In windows case, application is not knowing when button is released. It > knows only mouse moves inside the window. > > Behaviour of Release events should be consistent in both the platforms. Tossing this bug to Sam to look at. Sam, which platform is correct here, or should either behavior be considered acceptable? --ryan. Hi Mr. Sam, Which is correct behavior? Regards, Pankaj We probably want to release the button when it actually goes up. I think currently we also release the button when the window loses focus. |