Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug #891
Browse files Browse the repository at this point in the history
 Mason Wheeler      2009-11-23 06:59:48 PST

There's code in SDL_RecreateWindow specifically to handle SDL_WINDOW_FOREIGN,
but it appears to have been overlooked in the allowed_flags constant.  This
causes the line

    window->flags = (flags & allowed_flags);

to strip SDL_WINDOW_FOREIGN from the window's flags, which breaks some code in
WIN_WindowProc in SDL_win32Events.c that treats foreign windows differently.
This can be trivially fixed by defining allowed_flags as

    const Uint32 allowed_flags = (SDL_WINDOW_FULLSCREEN |
                                  SDL_WINDOW_OPENGL |
                                  SDL_WINDOW_BORDERLESS |
                                  SDL_WINDOW_RESIZABLE |
                                  SDL_WINDOW_INPUT_GRABBED |
                                  SDL_WINDOW_FOREIGN);
  • Loading branch information
slouken committed Nov 24, 2009
1 parent f10b833 commit 1f32393
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/SDL_video.c
Expand Up @@ -862,7 +862,8 @@ SDL_RecreateWindow(SDL_Window * window, Uint32 flags)
SDL_WINDOW_OPENGL |
SDL_WINDOW_BORDERLESS |
SDL_WINDOW_RESIZABLE |
SDL_WINDOW_INPUT_GRABBED);
SDL_WINDOW_INPUT_GRABBED |
SDL_WINDOW_FOREIGN);
char *title = window->title;

if ((flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) {
Expand Down

0 comments on commit 1f32393

Please sign in to comment.