We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1517 - Debug message and resize window problem
Summary: Debug message and resize window problem
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: All Haiku
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 03:23 UTC by PulkoMandy
Modified: 2013-05-29 06:26 UTC (History)
0 users

See Also:


Attachments
Fix the window jumping to center on screen at each resize event (1.26 KB, application/octet-stream)
2012-06-09 03:23 UTC, PulkoMandy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PulkoMandy 2012-06-09 03:23:56 UTC
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)
Comment 1 Sam Lantinga 2013-05-29 06:26:58 UTC
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!