aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/events.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 11:04:10 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-03 11:04:10 +0100
commit20029dbc8f7d03211ceaf00001418fb75b9df644 (patch)
treee8950e052bb5ee4328a052a9cf04efc847c47eff /nx-X11/programs/Xserver/dix/events.c
parent9d41e84ea9baf215c6de11224dc2597cd37359dc (diff)
parent3e315cd17a519dbcafff18d4294a6f7bb8070767 (diff)
downloadnx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.tar.gz
nx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.tar.bz2
nx-libs-20029dbc8f7d03211ceaf00001418fb75b9df644.zip
Merge branch 'uli42-pr/happyvalgrind' into 3.6.x
Fixes ArcticaProject/nx-libs#325. Fixes ArcticaProject/nx-libs#326. Attribute GH PR #360: https://github.com/ArcticaProject/nx-libs/pull/360
Diffstat (limited to 'nx-X11/programs/Xserver/dix/events.c')
-rw-r--r--nx-X11/programs/Xserver/dix/events.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index fde3e91dd..73187f712 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -652,6 +652,7 @@ SyntheticMotion(int x, int y)
y += panoramiXdataPtr[0].y - panoramiXdataPtr[sprite.screen->myNum].y;
}
#endif
+ memset(&xE, 0, sizeof(xEvent));
xE.u.keyButtonPointer.rootX = x;
xE.u.keyButtonPointer.rootY = y;
if (syncEvents.playingEvents)
@@ -1022,7 +1023,7 @@ EnqueueEvent(xEvent *xE, DeviceIntPtr device, int count)
return;
}
}
- qe = (QdEventPtr)malloc(sizeof(QdEventRec) + (count * sizeof(xEvent)));
+ qe = (QdEventPtr)calloc(1, sizeof(QdEventRec) + (count * sizeof(xEvent)));
if (!qe)
return;
qe->next = (QdEventPtr)NULL;
@@ -3100,7 +3101,6 @@ EnterLeaveEvent(
register WindowPtr pWin,
Window child)
{
- xEvent event;
register DeviceIntPtr keybd = inputInfo.keyboard;
WindowPtr focus;
register DeviceIntPtr mouse = inputInfo.pointer;
@@ -3122,6 +3122,7 @@ EnterLeaveEvent(
}
if (mask & filters[type])
{
+ xEvent event;
memset(&event, 0, sizeof(xEvent));
event.u.u.type = type;
event.u.u.detail = detail;
@@ -3244,6 +3245,7 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr
return;
}
#endif
+ memset(&event, 0, sizeof(xEvent));
event.u.focus.mode = mode;
event.u.u.type = type;
event.u.u.detail = detail;