diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:58:56 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:58:56 +0200 |
commit | 6f5e20bc49695159bd3b313333591c4eb27ad422 (patch) | |
tree | 37ebef88dfd3c9f112b41e136c3a9aa73a2857b1 /nx-X11/programs/Xserver/hw/nxagent/Events.c | |
parent | 45b970f25634519dac302a5691a7a2d45f8db49f (diff) | |
download | nx-libs-6f5e20bc49695159bd3b313333591c4eb27ad422.tar.gz nx-libs-6f5e20bc49695159bd3b313333591c4eb27ad422.tar.bz2 nx-libs-6f5e20bc49695159bd3b313333591c4eb27ad422.zip |
Imported nxagent-3.3.0-9.tar.gznxagent/3.3.0-9
Summary: Imported nxagent-3.3.0-9.tar.gz
Keywords:
Imported nxagent-3.3.0-9.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index ab8c13cae..3c1458cb7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -63,7 +63,13 @@ #include "NXproto.h" #include "xfixesproto.h" +#define Window XlibWindow +#define Atom XlibAtom +#define Time XlibXID #include <X11/extensions/Xfixes.h> +#undef Window +#undef Atom +#undef Time #ifdef NXAGENT_FIXKEYS #include "inputstr.h" @@ -789,8 +795,9 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) } x.u.u.type = KeyRelease; - x.u.u.detail = X.xkey.keycode; - x.u.keyButtonPointer.time = nxagentLastKeyPressTime + (X.xkey.time - nxagentLastServerTime); + x.u.u.detail = nxagentConvertKeycode(X.xkey.keycode); + x.u.keyButtonPointer.time = nxagentLastKeyPressTime + + (X.xkey.time - nxagentLastServerTime); nxagentLastServerTime = X.xkey.time; @@ -918,7 +925,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) #ifdef NX_DEBUG_INPUT if (nxagentDebugInput == 1) { - fprintf(stderr, "nxagentDispatchEvents: Going to handle new ButtonPress event.\n"); + fprintf(stderr, "nxagentDispatchEvents: Going to handle new ButtonRelease event.\n"); } #endif @@ -1016,18 +1023,17 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) nxagentLastEnteredWindow = pWin; } - if (nxagentPulldownDialogPid == 0 && (X.xmotion.y_root < - nxagentLastEnteredTopLevelWindow -> drawable.y + 4)) + if (nxagentPulldownDialogPid == 0 && nxagentLastEnteredTopLevelWindow && + (X.xmotion.y_root < nxagentLastEnteredTopLevelWindow -> drawable.y + 4)) { - if (pWin && nxagentLastEnteredTopLevelWindow && - nxagentClientIsDialog(wClient(pWin)) == 0 && - nxagentLastEnteredTopLevelWindow -> parent == WindowTable[0] && - nxagentLastEnteredTopLevelWindow -> overrideRedirect == False && - X.xmotion.x_root > (nxagentLastEnteredTopLevelWindow -> drawable.x + - (nxagentLastEnteredTopLevelWindow -> drawable.width >> 1) - 50) && - X.xmotion.x_root < (nxagentLastEnteredTopLevelWindow -> drawable.x + - (nxagentLastEnteredTopLevelWindow -> drawable.width >> 1) + 50) && - nxagentOption(Menu) == 1) + if (pWin && nxagentClientIsDialog(wClient(pWin)) == 0 && + nxagentLastEnteredTopLevelWindow -> parent == WindowTable[0] && + nxagentLastEnteredTopLevelWindow -> overrideRedirect == False && + X.xmotion.x_root > (nxagentLastEnteredTopLevelWindow -> drawable.x + + (nxagentLastEnteredTopLevelWindow -> drawable.width >> 1) - 50) && + X.xmotion.x_root < (nxagentLastEnteredTopLevelWindow -> drawable.x + + (nxagentLastEnteredTopLevelWindow -> drawable.width >> 1) + 50) && + nxagentOption(Menu) == 1) { nxagentPulldownDialog(nxagentLastEnteredTopLevelWindow -> drawable.id); } @@ -1052,7 +1058,8 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) #ifdef NX_DEBUG_INPUT if (nxagentDebugInput == 1) { - fprintf(stderr, "nxagentDispatchEvents: Adding motion event [%d, %d] to the queue.\n", x.u.keyButtonPointer.rootX, x.u.keyButtonPointer.rootY); + fprintf(stderr, "nxagentDispatchEvents: Adding motion event [%d, %d] to the queue.\n", + x.u.keyButtonPointer.rootX, x.u.keyButtonPointer.rootY); } #endif @@ -1911,8 +1918,9 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis(); + x.u.u.type = KeyPress; - x.u.u.detail = X -> xkey.keycode; + x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode); x.u.keyButtonPointer.time = nxagentLastKeyPressTime; nxagentLastServerTime = X -> xkey.time; |