| Summary: | Debug message and resize window problem | ||
|---|---|---|---|
| Product: | SDL | Reporter: | PulkoMandy <pulkomandy> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 1.2 | ||
| Hardware: | All | ||
| OS: | Haiku | ||
| Attachments: | Fix the window jumping to center on screen at each resize event | ||
This code has been rewritten for SDL 2.0. Can you look and see if this issue is active there? http://www.libsdl.org/tmp/SDL-2.0.zip Thanks! |
Created attachment 874 [details] Fix the window jumping to center on screen at each resize event The current code in Haiku tries to open a centered window. This works well, but when the application allows the window to be resized, resizing moves it back to screen center, which is rather annoying behaviour. Moreover, a PrintToStream call was left in that code, leading to the window size being output on stdout at each resize. Attached patches fixes both of these, but the window is now open at (0,0), that is, the titlebar and left border are out of the screen. On Haiku, it is possible to call BWindow::CenterOnScreen() to center the window. I tried to do that just after the window creation in video init, but the window is created with a size of (0,0) so the top left corner is centered on screen, which is not very good either. I don't think there's a safe spot to do the centering on first creaton of the window, then not on resize (IIRC, resizing a window in SDL 1.2 needs re-running the video init code)