x11: pass a long to XChangeProperty, not an int.
authorRyan C. Gordon
Tue, 04 Jul 2017 20:44:07 -0400
changeset 1112797c66d81b2c9
parent 11126 9dd391cb1923
child 11128 9dda3f3e9794
x11: pass a long to XChangeProperty, not an int.

The Xlib documentation demands that 32-bit values here be passed in a long,
even when long itself isn't a 32-bit value. Otherwise libx11 might read
memory incorrectly.

Fixes Bugzilla #3692.
src/video/x11/SDL_x11window.c
     1.1 --- a/src/video/x11/SDL_x11window.c	Mon Jul 03 16:45:12 2017 -0400
     1.2 +++ b/src/video/x11/SDL_x11window.c	Tue Jul 04 20:44:07 2017 -0400
     1.3 @@ -375,7 +375,7 @@
     1.4      Atom _NET_WM_WINDOW_TYPE;
     1.5      Atom wintype;
     1.6      const char *wintype_name = NULL;
     1.7 -    int compositor = 1;
     1.8 +    long compositor = 1;
     1.9      Atom _NET_WM_PID;
    1.10      Atom XdndAware, xdnd_version = 5;
    1.11      long fevent = 0;