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 2452 - Wrong window dimensions reported after calling SDL_SetWindowResize on a snapped/maximized window
Summary: Wrong window dimensions reported after calling SDL_SetWindowResize on a snapp...
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-16 19:45 UTC by ny00
Modified: 2017-08-14 14:04 UTC (History)
1 user (show)

See Also:


Attachments
Test case (2.76 KB, text/x-csrc)
2014-03-16 19:45 UTC, ny00
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ny00 2014-03-16 19:45:48 UTC
Created attachment 1593 [details]
Test case

Suppose that an app lets the user resize a window, but also tries to resize the window on its own later using SDL_SetWindowSize, for a specific in-app event (not necessarily an "SDL event"). If it fails to do so, because the user has snapped the window to one of the desktop's sides or maximized the window beforehand, then the app should still be able to handle this case in some way.

Problem is the wrong window dimensions are reported by SDL_GetWindowSize.

A test case has been attached, demonstrating the issue. While the application maximizes the window automatically, manual maximization leads to the same problem.

It is true that SDL seems to have tools for handling maximized windows, I'm not sure about other actions like snapping, though, and it is probably the wrong way to check for a list of specific possible actions applied to the window by the user (or even the OS automatically) anyway.

A few details about the local environment:
- OS: Ubuntu 12.04 for x86-64 with the Unity shell
- GPU: GTX 460
- GPU drivers version: 331.38
Comment 1 Ryan C. Gordon 2015-02-19 05:22:23 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 2 Sam Lantinga 2017-08-14 14:04:27 UTC
I just tested this with the latest SDL snapshot:
http://www.libsdl.org/tmp/SDL-2.0.zip

The behavior I saw was that the window was maximized, and then the window size was set, taking it out of maximized state.

Ryan, can you check to see if this is what happens on Linux, or is the window manager messing with us here?