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 5144 - SDL_CreateWindow() width defaults to 120 when creating smaller windows on Windows platform.
Summary: SDL_CreateWindow() width defaults to 120 when creating smaller windows on Win...
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.12
Hardware: x86 Windows 10
: P2 trivial
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-17 16:11 UTC by Dan Lawrence
Modified: 2020-05-17 16:11 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Lawrence 2020-05-17 16:11:46 UTC
Reported on the pygame issue tracker originally where husano896 kindly provided a C code reproduction:

    window = SDL_CreateWindow("Test", 0, 0, 20, 20, 0);
    int check_w, check_h;
    SDL_GetWindowSize(window, &check_w, &check_h);

    //Shows 120,20
    std::cout << check_w << "," << check_h;

Apparently windows can be made smaller than this since a second call to set_mode in pygame will correctly set the size of the window.

See the original issue here:

https://github.com/pygame/pygame/issues/993

Cheers,

Dan