Mon, 14 Aug 2017 16:34:54 -0700Fixed bug 2344 - CHECK_WINDOW_MAGIC should include __FILE__ and __LINE__
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 16:34:54 -0700] rev 11294
Fixed bug 2344 - CHECK_WINDOW_MAGIC should include __FILE__ and __LINE__

Martin Gerhardy

just for easier debugging issues in the own code...

SDL_CreateRenderer should maybe also use this macro

Ryan C. Gordon

I'll go one better: it should have an SDL_assert().

Mon, 14 Aug 2017 16:09:44 -0700Fixed Windows build due to an implicit memcpy generated by the optimizer
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 16:09:44 -0700] rev 11293
Fixed Windows build due to an implicit memcpy generated by the optimizer

Mon, 14 Aug 2017 14:14:45 -0700Fixed bug 3753 - Android : load methodID during initialization
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 14:14:45 -0700] rev 11292
Fixed bug 3753 - Android : load methodID during initialization

Sylvain

Small patch to load some java methodID at start-up (and avoid a potential crash at run-time).

Mon, 14 Aug 2017 14:10:48 -0700Fixed bug 2360 - Wrong -rpath setting includes DESTDIR rather that only the libdir
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 14:10:48 -0700] rev 11291
Fixed bug 2360 - Wrong -rpath setting includes DESTDIR rather that only the libdir

Marcus von Appen

The LT_LDFLAGS in Makefile.in contain the $(DESTDIR) in -rpath, which instructs libtool to take a wrong path into account for linking.

The issue arises, if DESTDIR is passed at build time and installation time.
-rpath only should use $(libdir) for both SDL 1.2 and SDL 2.x.

Mon, 14 Aug 2017 13:48:13 -0700Fixed bug 2418 - Structure SDL_gestureTouch leaking
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 13:48:13 -0700] rev 11290
Fixed bug 2418 - Structure SDL_gestureTouch leaking

Leonardo

Structure SDL_gestureTouch gets reallocated for every new added gesture but its never freed.

Proposed patch add the function SDL_GestureQuit() that takes care of doing that and gets called when TouchQuit is called.

Gabriel Jacobo

Thanks for the patch. I think it needs a bit of extra work though, looking at the code in SDL_gesture.c , I see that SDL_numGestureTouches only goes up, I think the right fix here involves adding SDL_GestureDelTouch (hooked into SDL_DelTouch) as well as SDL_GestureQuit (as you posted in your patch).

Mon, 14 Aug 2017 13:37:14 -0700Fixed bug 2441 - SDL_DuplicateSurface
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 13:37:14 -0700] rev 11289
Fixed bug 2441 - SDL_DuplicateSurface


Rainer Deyke

I've written a small patch that adds a small SDL_DuplicateSurface function to SDL. I've written the function as part of a larger (as yet unfinished) patch, but I think this function is useful enough that it merits inclusion in SDL on its own.

Mon, 14 Aug 2017 10:28:47 -0700Fixed bug 2500 - X11: SDL tries (and fails) to hide foreign windows
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:28:47 -0700] rev 11288
Fixed bug 2500 - X11: SDL tries (and fails) to hide foreign windows

Alvin

I'm interested in this bug as well. I have experienced it when trying to embed an SDL_Window into a FLTK application. To do this, I create a FLTK window (window inside a window - think video player) and then use SDL_CreateWindowFrom() on the inner most window's Xlib Window*. After which, I create a renderer.

In my situation I am using the FLTK GUI toolkit.

What I have experienced is that the SDL_CreateRender() will recreate the window in order to properly setup OpenGL capability. As part of this process, the window is hidden and a call is executed that waits indefinitely for an acknowledgement that the window was indeed unmapped. This is where my program hangs.

Please correct me if I am wrong, but should SDL2 not make Xlib calls that effect the Xlib Window in this situation (e.g. When SDL_CreateWindowFrom() is used)? The toolkit being used typically assumes responsibility and, I presume, tracks all Xlib Windows it creates.

On line src/video/SDL_video.c:1372 the comment associated with setting SDL_WINDOW_FOREIGN reads:

/* Can't destroy and re-create foreign windows, hrm */

Since I do not know the reason for hiding the window in the first place, the attached patch simply does not wait for a response when X11_XWithdrawWindow() and X11_XMapRaised() are issued by X11_HideWindow() and X11_ShowWindow(), respectively. I presume that the GUI toolkit (GTK, FLTK, etc.) has or will consume the acknowledging event as it is managing the Xlib Window (or it thinks it is).

I have tested the patch against hg d09d4b578e77 and I have successfully tested:
* Embedding the SDL_Window inside a FLTK application.
* Calling SDL_SetWindowSize() when FLTK resizes the window (e.g. dragging cursor on the edge of the window).
* Filling the renderer's default target blue and drawing a red fill square at the centre (exciting, I know!)
* Calling SDL_Quit() when the application terminates

I do not receive any Xlib erorr messages (BadWindow, etc.) in any of those situations.

Mon, 14 Aug 2017 10:15:38 -0700Fixed bug 3752 - minor os2 defines
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:15:38 -0700] rev 11287
Fixed bug 3752 - minor os2 defines

Ozkan Sezer

Attached three patches, so these minor os/2 bits get registered mainstream:

1. SDL_syswm.h: add SDL_SYSWM_OS2 to SDL_SYSWM_TYPE enum
2. SDL_platform.h: recognize __EMX__ too as __OS2__
3. begin_code.h: set SDLCALL as _System for OS/2.

Mon, 14 Aug 2017 10:14:07 -0700Fixed compiler warning with enum
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:14:07 -0700] rev 11286
Fixed compiler warning with enum

Mon, 14 Aug 2017 10:04:59 -0700Fixed setting the texture blend mode in the OpenGL ES2 renderer
Sam Lantinga <slouken@libsdl.org> [Mon, 14 Aug 2017 10:04:59 -0700] rev 11285
Fixed setting the texture blend mode in the OpenGL ES2 renderer