aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/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/hw/nxagent/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/hw/nxagent/Events.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index efe745718..d8512b548 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -1177,6 +1177,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
nxagentXkbNumTrap = 0;
}
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = KeyRelease;
x.u.u.detail = nxagentConvertKeycode(X.xkey.keycode);
x.u.keyButtonPointer.time = nxagentLastKeyPressTime +
@@ -1263,6 +1264,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
X.xbutton.window == nxagentFullscreenWindow &&
X.xbutton.subwindow == None))
{
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = ButtonPress;
x.u.u.detail = inputInfo.pointer -> button -> map[nxagentReversePointerMap[X.xbutton.button]];
x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
@@ -1336,6 +1338,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (minimize != True)
{
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = ButtonRelease;
x.u.u.detail = inputInfo.pointer -> button -> map[nxagentReversePointerMap[X.xbutton.button]];
x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
@@ -1402,6 +1405,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
}
#endif
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = MotionNotify;
if (nxagentOption(Rootless))
@@ -1583,6 +1587,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
if (!nxagentOption(Rootless) ||
inputInfo.keyboard->key->modifierMap[i * 8 + k])
{
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = KeyRelease;
x.u.u.detail = i * 8 + k;
x.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis();
@@ -1706,6 +1711,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
{
NewCurrentScreen(pScreen, X.xcrossing.x, X.xcrossing.y);
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = MotionNotify;
if (nxagentOption(Rootless))
@@ -2337,6 +2343,7 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result)
nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis();
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = KeyPress;
x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode);
x.u.keyButtonPointer.time = nxagentLastKeyPressTime;
@@ -2641,7 +2648,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
{
WindowPtr pWin;
- xEvent x;
*result = doNothing;
@@ -2695,6 +2701,9 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result)
char *message_data;
#endif
+ xEvent x;
+
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = ClientMessage;
x.u.u.detail = X -> xclient.format;
@@ -3201,7 +3210,6 @@ int nxagentHandleConfigureNotify(XEvent* X)
ClientPtr pClient;
WindowPtr pWinWindow;
WindowPtr pWin;
- xEvent x;
int sendEventAnyway = 0;
pWinWindow = nxagentWindowPtr(X -> xconfigure.window);
@@ -3294,6 +3302,9 @@ int nxagentHandleConfigureNotify(XEvent* X)
if (sendEventAnyway || X -> xconfigure.send_event)
{
+ xEvent x;
+
+ memset(&x, 0, sizeof(xEvent));
x.u.u.type = X -> xconfigure.type;
x.u.u.type |= 0x80;
@@ -3767,6 +3778,7 @@ void nxagentSendFakeKey(int key)
now = GetTimeInMillis();
+ memset(&fake, 0, sizeof(xEvent));
fake.u.u.type = KeyPress;
fake.u.u.detail = key;
fake.u.keyButtonPointer.time = now;
@@ -3792,6 +3804,8 @@ int nxagentInitKeyboardState()
fprintf(stderr, "nxagentInitKeyboardState: Initializing XKB state.\n");
#endif
+ memset(&X, 0, sizeof(XEvent));
+
XkbGetIndicatorState(nxagentDisplay, XkbUseCoreKbd, &modifiers);
xkbev -> state.locked_mods = 0x0;