| Summary: | SDL_GetWindowPosition() regression in 2.0.6 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Daniel <daniel.plakhotich> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz, sheppy |
| Version: | don't know | Keywords: | target-2.0.16 |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Daniel
2017-09-24 10:29:02 UTC
Yes, the bug is in SDL_SetWindowPosition() What window manager are you using? Ryan, can you take a look when you get a chance? My window manager is xfwm4 (Xfce). I currently found that this only happens after all events are polled. That's why testautomation_video.c doesn't detect the bug.
Here is a snippet:
SDL_SetWindowPosition(window, 1, 1);
int x, y;
SDL_GetWindowPosition(window, &x, &y);
printf("Pos %i %i\n", x, y);
SDL_Event event;
while (SDL_PollEvent(&event)) {
}
SDL_GetWindowPosition(window, &x, &y);
printf("New pos %i %i\n", x, y);
On my machine, it prints:
Pos 1 1
New pos 2 27
|