diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-28 22:07:00 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-08-27 08:26:59 +0200 |
commit | e7451477e00896b188188af622ab1a870715203f (patch) | |
tree | 4b2cd51b791316211b22f788dd691f7722c00c44 /nx-X11/programs/Xserver | |
parent | 504b1400eaf0fe5f2b0544857021484213825b01 (diff) | |
download | nx-libs-e7451477e00896b188188af622ab1a870715203f.tar.gz nx-libs-e7451477e00896b188188af622ab1a870715203f.tar.bz2 nx-libs-e7451477e00896b188188af622ab1a870715203f.zip |
Events.c: refactor nxagentHandleKeypress
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 10 |
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 74781f638..c93842305 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2222,8 +2222,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) @@ -2255,15 +2253,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; |