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

Summary: SDL_SetWindowSize() has no effect
Product: SDL Reporter: Kees Blom <Kees.Blom>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: jorgen
Version: HG 2.0   
Hardware: x86   
OS: Linux   

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