Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong window dimensions reported after calling SDL_SetWindowResize on a snapped/maximized window #1407

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 2 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2014-03-16 19:45:48 +0000, wrote:

Created attachment 1593
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

On 2015-02-19 05:22:23 +0000, Ryan C. Gordon wrote:

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!

On 2017-08-14 14:04:27 +0000, Sam Lantinga wrote:

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?

@blumens
Copy link

blumens commented Mar 21, 2021

This seems to be the same issue as bug #3217.

@slouken
Copy link
Collaborator

slouken commented Nov 4, 2023

I believe this is fixed with the recent work @icculus did for SDL 2.0. If you're still seeing this, go ahead reopen it.

@slouken slouken closed this as completed Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants