| Summary: | SDL_CreateWindow(w=INT_MAX, h=INT_MAX) claims to succeed | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Andrew Church <achurch+sdl> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | adam, icculus |
| Version: | HG 2.0 | Keywords: | triage-2.0.4 |
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Andrew Church
2013-11-20 13:25:49 UTC
I think the size you pass to SDL_CreateWindow is the size of the window when it's not fullscreen, even if you specify the SDL_WINDOW_FULLSCREEN flag. SDL_SetWindowDisplayMode is what actually changes the display mode, so I don't think this is a bug. (That said, I'm not terribly happy with the display and window management API. It certainly could be cleaner.) Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though! Ok, so part of the problem is that we try to center this window on the display, so it ends up at coordinates like (-1073740863, -1073741223), but XGetWindowAttributes() reports the window size as 65535x65535, so it got clamped somewhere inside the X server (or we simply lost the top 16 bits?). So in theory, your window exists, but not at the size you want and way way off-screen. More experimentation suggests that the maximum is more like 16k, and over this size, the X server is prone to crashing. I'm just putting an artificial clamp in SDL_CreateWindow(). If we ever find out we need more than 16k x 16k windows, we can lift it. --ryan. This is now sanity-checked in https://hg.libsdl.org/SDL/rev/409b20ba3e70. --ryan. |