| Summary: | Enter and leave events when window is minimized | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Indiana Kernick <kerndog73> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WORKSFORME | QA Contact: | Sam Lantinga <slouken> |
| Severity: | trivial | ||
| Priority: | P2 | ||
| Version: | 2.0.5 | ||
| Hardware: | x86_64 | ||
| OS: | macOS 10.12 | ||
|
Description
Indiana Kernick
2017-08-26 05:10:12 UTC
Are you reproducing this on Mac OS X? I'm trying here, running testsprite2 --info event, and I'm not seeing this behavior. Yes, this behaviour was observed on MacOS 10.12 I'm running 10.12.6. Are you seeing the problem with the testsprite2 example? I modified the event loop in testsprite2 to include:
if (event.type == SDL_WINDOWEVENT) {
if (event.window.event == SDL_WINDOWEVENT_ENTER) {
printf("Enter\n");
} else if (event.window.event == SDL_WINDOWEVENT_LEAVE) {
printf("Leave\n");
}
}
and I'm still seeing the bug. I also noticed something else. The sprites slow down while the window is being dragged. Interesting.
That's weird, I made the same change and I'm totally not seeing this bug. Are you using the latest SDL snapshot? http://www.libsdl.org/tmp/SDL-2.0.zip I just downloaded the latest snapshot from the link you provided. SDL-2.0.6-11410 and I'm still seeing the bug. I'm running a slightly older version of MacOS than you are 10.12.1 so could this be a bug with MacOS that was fixed in later versions? This might explain why I'm seeing the bug and you're not. If that is possible then I'll mark this bug as resolved and we can move on. PS While I've got an SDL developer with me, I'd like to take this opportunity to ask a question. Is there a simple way to stop the window from turning black while the window is being resized? This seems to be a common problem but I'm not seeing a solution anywhere. I'm just using the SDL rendering API not (OpenGL). Yeah, I think it's probably been fixed. Feel free to reopen this if you have more information or it's not fixed for you in the future. I don't know of any way to avoid the black screen. As far as I know the SDL code isn't executing during the resize. |