Skip to content

Commit

Permalink
Fixed bug 2086 - valgrind memory not released
Browse files Browse the repository at this point in the history
Sylvain

Someone provided a patch for this, recently on the mailing list :
-----

Hi,

it is possible to skip the bug in libX11 by using the defaults for
XNResourceName and XNResourceClass in `XCreateIC' (the table for the
"Input Context Values" [1] in libX11-doc shows that a default is
provided if it is not set).

diff -ur SDL2-2.0.3~/src/video/x11/SDL_x11window.c SDL2-2.0.3/src/video/x11/SDL_x11window.c
--- SDL2-2.0.3~/src/video/x11/SDL_x11window.c   2014-04-04 17:09:40.764307181 +0200
+++ SDL2-2.0.3/src/video/x11/SDL_x11window.c    2014-04-04 17:10:23.887765046 +0200
@@ -239,8 +239,7 @@
         data->ic =
             X11_XCreateIC(videodata->im, XNClientWindow, w, XNFocusWindow, w,
                        XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
-                       XNResourceName, videodata->classname, XNResourceClass,
-                       videodata->classname, NULL);
+                       NULL);
     }
 #endif
     data->created = created;


Tito Latini

[1] http://www.x.org/releases/X11R7.7-RC1/doc/libX11/libX11/libX11.html#Input_Context_Values
  • Loading branch information
slouken committed Apr 18, 2014
1 parent f6953cf commit 2dacb60
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/video/x11/SDL_x11window.c
Expand Up @@ -239,8 +239,7 @@ SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created)
data->ic =
X11_XCreateIC(videodata->im, XNClientWindow, w, XNFocusWindow, w,
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
XNResourceName, videodata->classname, XNResourceClass,
videodata->classname, NULL);
NULL);
}
#endif
data->created = created;
Expand Down

0 comments on commit 2dacb60

Please sign in to comment.