From 1c020ea9ce571fef7a893b73e866b3dfa45da9d7 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 5 Jan 2018 01:19:40 +0100 Subject: Events.c: change scope of XButtonEvent struct and clear it before use --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index cf42d84fb..315b6572e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -3958,10 +3958,11 @@ void nxagentDeactivatePointerGrab() { GrabPtr grab = inputInfo.pointer -> grab; - XButtonEvent X; - if (grab) { + XButtonEvent X; + memset(&X, 0, sizeof(XButtonEvent)); + X.type = ButtonRelease; X.serial = 0; X.send_event = FALSE; -- cgit v1.2.3