src/video/x11


Log

Author Commit Date CI Message
Ryan C. Gordon dd5277d6 2014-05-24T21:06:40 Fixed stack overflow in X11_CreateWindow() (thanks, rapha and Brad!). This should be a "long" which on a 64-bit system is likely to be > 32-bits, causing XGetICValues() to write past the end of the variable (and stack). Fixes Bugzilla #2513.
Sam Lantinga 2dacb60b 2014-04-17T20:06:02 Fixed bug 2086 - valgrind memory not released 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
Sam Lantinga f6953cf4 2014-04-17T20:02:11 Fixed bug 2502 - Memory leak inside SDL_x11events.c -> X11_DispatchEvent(_THIS) bojko_1000 Code @566: if (data->xwindow) { Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0); Atom type = None; int format; unsigned long nitems = 0, bytes_after; unsigned char *property; X11_XGetWindowProperty(display, data->xwindow, _net_frame_extents, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property); if (type != None && nitems == 4) { border_left = ((long*)property)[0]; border_right = ((long*)property)[1]; border_top = ((long*)property)[2]; border_bottom = ((long*)property)[3]; } } Code after _the fix_: if (data->xwindow) { Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0); Atom type = None; int format; unsigned long nitems = 0, bytes_after; unsigned char *property; X11_XGetWindowProperty(display, data->xwindow, _net_frame_extents, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property); if (type != None && nitems == 4) { border_left = ((long*)property)[0]; border_right = ((long*)property)[1]; border_top = ((long*)property)[2]; border_bottom = ((long*)property)[3]; } X11_XFree(property); } I have found that leak with valgrind.
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Sam Lantinga e14e0ef9 1970-01-01T04:04:21 Fixed crash if the OpenGL library hasn't been loaded yet