aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-28 22:07:00 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-08-06 22:00:17 +0200
commitc260ae425475597120a65ad413d4341f7698a469 (patch)
tree2ecfd0bda0a4792fb5c456da5c80bf8ae5380173 /nx-X11/programs/Xserver
parent360cb5dd9c307be05dfeee93b5303e257b389f1c (diff)
downloadnx-libs-c260ae425475597120a65ad413d4341f7698a469.tar.gz
nx-libs-c260ae425475597120a65ad413d4341f7698a469.tar.bz2
nx-libs-c260ae425475597120a65ad413d4341f7698a469.zip
Events.c: refactor nxagentHandleKeypress
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index d8bf4df60..666302606 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -2225,8 +2225,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was
int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result)
{
- xEvent x;
-
if (nxagentXkbState.Initialized == 0)
{
if (X -> xkey.keycode == nxagentCapsLockKeycode)
@@ -2258,15 +2256,15 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result)
nxagentXkbState.Num = (~nxagentXkbState.Num & 1);
}
+ nxagentLastServerTime = X -> xkey.time;
+
nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis();
-
- memset(&x, 0, sizeof(xEvent));
+
+ xEvent x = {0};
x.u.u.type = KeyPress;
x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode);
x.u.keyButtonPointer.time = nxagentLastKeyPressTime;
- nxagentLastServerTime = X -> xkey.time;
-
mieqEnqueue(&x);
CriticalOutputPending = 1;