| Summary: | Slight mistake in GetWindowStyle in SDL_windowswindow.c | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Coriiander <coriiander> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/4de70b7f43af |
There's a slight mistake in the function "GetWindowStyle" found in file "SDL_windowswindow.c". When a window is marked to be resizable, the resizable style is being added regardless of whether the window has a border or not. While for some arcane, hidden semantics this can be ok, it's still inconsistent in this case. CURRENT: if (window->flags & SDL_WINDOW_FULLSCREEN) { style |= STYLE_FULLSCREEN; } else { if (window->flags & SDL_WINDOW_BORDERLESS) { style |= STYLE_BORDERLESS; } else { style |= STYLE_NORMAL; } if (window->flags & SDL_WINDOW_RESIZABLE) { style |= STYLE_RESIZABLE; } } CHANGE: (move resizable check into other scope) if (window->flags & SDL_WINDOW_FULLSCREEN) { style |= STYLE_FULLSCREEN; } else { if (window->flags & SDL_WINDOW_BORDERLESS) { style |= STYLE_BORDERLESS; } else { style |= STYLE_NORMAL; if (window->flags & SDL_WINDOW_RESIZABLE) { style |= STYLE_RESIZABLE; } } }