aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_x/ecore_x.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-08-01 18:12:21 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-08-01 18:16:23 +0200
commitaca00f85021204bf18a536e271f7525781ff956b (patch)
tree530dcebb470764e2d43bde9aee842bd9b1f61bc2 /src/lib/ecore_x/ecore_x.c
parentedje_svg: Fix handling of realloc (diff)
downloadefl-aca00f85021204bf18a536e271f7525781ff956b.tar.gz
ecore_x: init XEvents before passing to x
it turns out that xlib is going to copy the complete struct into something internal. This might lead to the condition that a uninitalized value might be part of the struct, and when later the struct is read again the code might do wrong stuff since that value could be set now to a randomly other meaningfull value. This turned out on me in e as i could not write any letters like ßöäü, since that lead to a not returning call to _XReply internal of xlib. Dugging that showed that xlib was waiting on a reply of a call that never got executed, and the XEvent it is waiting on just contians a randomly correct value. @fix
Diffstat (limited to 'src/lib/ecore_x/ecore_x.c')
-rw-r--r--src/lib/ecore_x/ecore_x.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/ecore_x/ecore_x.c b/src/lib/ecore_x/ecore_x.c
index 8ca8e61f45..f54f3c30be 100644
--- a/src/lib/ecore_x/ecore_x.c
+++ b/src/lib/ecore_x/ecore_x.c
@@ -1770,7 +1770,7 @@ ecore_x_window_button_grab(Ecore_X_Window win,
static void
_ecore_x_sync_magic_send(int val, Ecore_X_Window swin, int b, int mod, int anymod)
{
- XEvent xev;
+ XEvent xev = { 0 };
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
@@ -2138,7 +2138,7 @@ ecore_x_client_message32_send(Ecore_X_Window win,
long d3,
long d4)
{
- XEvent xev;
+ XEvent xev = { 0 };
Eina_Bool ret;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -2174,7 +2174,7 @@ ecore_x_client_message8_send(Ecore_X_Window win,
const void *data,
int len)
{
- XEvent xev;
+ XEvent xev = { 0 };
Eina_Bool ret;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -2201,7 +2201,7 @@ ecore_x_mouse_move_send(Ecore_X_Window win,
int x,
int y)
{
- XEvent xev;
+ XEvent xev = { 0 };
XWindowAttributes att;
Window tw;
int rx, ry;
@@ -2234,7 +2234,7 @@ ecore_x_mouse_down_send(Ecore_X_Window win,
int y,
int b)
{
- XEvent xev;
+ XEvent xev = { 0 };
XWindowAttributes att;
Window tw;
int rx, ry;
@@ -2267,7 +2267,7 @@ ecore_x_mouse_up_send(Ecore_X_Window win,
int y,
int b)
{
- XEvent xev;
+ XEvent xev = { 0 };
XWindowAttributes att;
Window tw;
int rx, ry;
@@ -2299,7 +2299,7 @@ ecore_x_mouse_in_send(Ecore_X_Window win,
int x,
int y)
{
- XEvent xev;
+ XEvent xev = { 0 };
XWindowAttributes att;
Window tw;
int rx, ry;
@@ -2333,7 +2333,7 @@ ecore_x_mouse_out_send(Ecore_X_Window win,
int x,
int y)
{
- XEvent xev;
+ XEvent xev = { 0 };
XWindowAttributes att;
Window tw;
int rx, ry;