| Bug in SDL2 RC2 under Visual studio 2008 |
| Bug in SDL2 RC2 under Visual studio 2008 |
|
Sam Lantinga
|
This actually isn't technically a bug, since the window position is in terms of the client area, and there aren't API functions to get the window border size.
I agree it's not ideal though and am open to suggestions. On Tue, Jun 11, 2013 at 3:06 AM, neoaggelos wrote:
|
|||||||||||||
|
|
||||||||||||||
| Bug in SDL2 RC2 under Visual studio 2008 |
|
Andreas Schiffler
Guest
|
As per web-search wisdom, one CAN get the border size (and thus could automatically adjust the position away from 0,0 accordingly).
On XP one can use GetWindowRect (see http://msdn.microsoft.com/en-us/library/windows/desktop/ms633519%28v=vs.85%29.aspx). On Vista and above OS's it is more complicated. One needs to dynamically bind to dwmapi.dll, use GetProcAddress() to obtain the DwmGetWindowAttribute() function (see http://msdn.microsoft.com/en-us/library/windows/desktop/aa969515%28v=vs.85%29.aspx), then call it with the DWMWA_EXTENDED_FRAME_BOUNDS argument to request the genuine window frame dimensions. Here is some working Python code to illustrate this: http://stackoverflow.com/questions/3192232/getwindowrect-too-small-on-windows-7 In either case one would need to create the window off screen, query for the framesize and then position with the framesize as fudge factor. What are the positioning behaviors across other platforms? Client area or client+frame area? On 6/12/2013 10:22 PM, Sam Lantinga wrote:
|
|||||||||||||||||
|
|
||||||||||||||||||
| Bug in SDL2 RC2 under Visual studio 2008 |
|
Sam Lantinga
|
Sorry, to clarify, there aren't _SDL_ functions to get the window borders. :)
The positioning behavior is (should be) client area across all platforms. On Wed, Jun 12, 2013 at 10:44 PM, Andreas Schiffler wrote:
|
|||||||||||||||||||
|
|
||||||||||||||||||||
| Bug in SDL2 RC2 under Visual studio 2008 |
|
Andreas Schiffler
Guest
|
This may be a good candidate for a new SDL 2.1 API - either in the form of a special window creation flag that adjusts the position according to the frame size and/or a function operating on an existing window that returns the framesize.
On 6/12/2013 10:46 PM, Sam Lantinga wrote:
|
|||||||||||||||||||||
|
|
||||||||||||||||||||||

