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

Maximize Button/SDL_RESIZABLE Flag #452

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

Maximize Button/SDL_RESIZABLE Flag #452

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
invalid This doesn't seem right

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 1.2.13
Reported for operating system, platform: Linux, x86

Comments on the original bug report:

On 2009-01-16 16:07:40 +0000, Jonathan Greig wrote:

I tested, and apparently to be able to use the maximize button, you must pass the SDL_RESIZABLE flag to the video mode on THE VERY FIRST TIME IT IS INITIALIZED OR ELSE IT WONT WORK.

My code was setting:

/* Create a 640x480 OpenGL screen */
if ( SDL_SetVideoMode(640, 480, 0, SDL_OPENGL) == NULL ) {
    fprintf(stderr, "Unable to create OpenGL screen: %s\n", SDL_GetError());
    SDL_Quit();
    exit(2);
}

on the very first initialization. And I was hitting SDLK_p to actually change the video mode with this code in an SDL_Event while loop:

                  case SDLK_p:
                      /* Create a 800x600 OpenGL screen */
                      if ( SDL_SetVideoMode(800, 600, 0, SDL_RESIZABLE | SDL_OPENGL) == NULL ) {
                          fprintf(stderr, "Unable to create OpenGL screen: %s\n", SDL_GetError());
                          SDL_Quit();
                          exit(2);
                      }

                      /* Set the title bar in environments that support it */
                      SDL_WM_SetCaption("CAD VIEWER TEST", NULL);

                      /* Loop, drawing and checking events */
                      InitGL(800, 600);
                  break;

I am using SDL 1.2.13 on Kubuntu 8.04 "Hardy Heron" and that it where I reproduced this from. I haven't tested on Windows at this point but I would think it occurs there too.

On 2009-09-13 16:33:34 +0000, Ryan C. Gordon wrote:

Tagging this bug with "target-1.2.14" so we can try to resolve it for SDL 1.2.14.

Please note that we may choose to resolve it as WONTFIX. This tag is largely so we have a comprehensive wishlist of bugs to examine for 1.2.14 (and so we can close bugs that we'll never fix, rather than have them live forever in Bugzilla).

--ryan.

On 2009-09-21 04:01:04 +0000, Sam Lantinga wrote:

Yes, this is the expected behavior. You can't change the resize hints on a window in X11 once it's been shown and registered with the window manager.

On 2009-09-21 05:32:40 +0000, Ryan C. Gordon wrote:

(We should probably tear down the window and rebuild it for this sort of case in SDL 1.3.)

As a workaround for 1.2, if you need to add/remove SDL_RESIZABLE, you can probably call SDL_Quit() then SDL_Init() before SDL_SetVideoMode() to "fix" this.

--ryan.

@SDLBugzilla SDLBugzilla added bug invalid This doesn't seem right labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant