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 1513 - SDL_SetWindowSize() has no effect
Summary: SDL_SetWindowSize() has no effect
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
: 1724 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-05 05:02 UTC by Kees Blom
Modified: 2013-02-18 19:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kees Blom 2012-06-05 05:02:18 UTC
SDL_SetWindowSize() has no effect, but when followed by SDL_SetWindowPosition() it has some effect,
only the the window height then is set to the desired value, but the width is not.
The latter problem can be fixed as follows:

--- a/src/video/x11/SDL_x11window.c	Mon Jun 04 12:31:14 2012 -0400
+++ b/src/video/x11/SDL_x11window.c	Tue Jun 05 13:44:24 2012 +0200
@@ -762,7 +762,7 @@
 
          XGetWMNormalHints(display, data->xwindow, sizehints, &userhints);
 
-         sizehints->min_width = sizehints->max_height = window->w;
+         sizehints->min_width = sizehints->max_width = window->w;
          sizehints->min_height = sizehints->max_height = window->h;
 
          XSetWMNormalHints(display, data->xwindow, sizehints);
Comment 1 (disabled) Jørgen Tjernø 2013-02-18 14:25:36 UTC
Updated this to Linux, since it seems like this is a Linux bug (due to the patch suggested).
Comment 2 (disabled) Jørgen Tjernø 2013-02-18 14:27:11 UTC
*** Bug 1724 has been marked as a duplicate of this bug. ***
Comment 3 (disabled) Jørgen Tjernø 2013-02-18 19:14:04 UTC
This should be fixed in latest HG version of SDL2.

Commit fixing it: http://hg.libsdl.org/SDL/rev/f75b1bd8eabc