diff options
Diffstat (limited to 'XTrap')
-rw-r--r-- | XTrap/xtrapddmi.c | 9 | ||||
-rw-r--r-- | XTrap/xtrapdi.c | 9 |
2 files changed, 11 insertions, 7 deletions
diff --git a/XTrap/xtrapddmi.c b/XTrap/xtrapddmi.c index 73a20c1f6..ec094ecf4 100644 --- a/XTrap/xtrapddmi.c +++ b/XTrap/xtrapddmi.c @@ -60,6 +60,7 @@ SOFTWARE. # include "extnsionst.h" /* Server ExtensionEntry definitions */ # include "scrnintstr.h" /* Screen struct */ #endif +#include "inputstr.h" #include <X11/extensions/xtrapdi.h> #include <X11/extensions/xtrapddmi.h> @@ -96,8 +97,8 @@ int XETrapSimulateXEvent(register xXTrapInputReq *request, xEvent xev; register int x = request->input.x; register int y = request->input.y; - DevicePtr keydev = LookupKeyboardDevice(); - DevicePtr ptrdev = LookupPointerDevice(); + DevicePtr keydev = (DevicePtr)PickKeyboard(client); + DevicePtr ptrdev = (DevicePtr)PickPointer(client); if (request->input.screen < screenInfo.numScreens) { @@ -130,8 +131,8 @@ int XETrapSimulateXEvent(register xXTrapInputReq *request, { /* Set new cursor position on screen */ XETrap_avail.data.cur_x = x; XETrap_avail.data.cur_y = y; - NewCurrentScreen (pScr, x, y); /* fix from amnonc@mercury.co.il */ - if (!(*pScr->SetCursorPosition)(pScr, x, y, xFalse)) + NewCurrentScreen (inputInfo.pointer, pScr, x, y); /* fix from amnonc@mercury.co.il */ + if (!(*pScr->SetCursorPosition)(inputInfo.pointer, pScr, x, y, xFalse)) { status = BadImplementation; } diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index 80124fa73..91874f0ca 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -71,6 +71,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include "pixmapstr.h" /* DrawableRec */ #include "windowstr.h" /* Drawable Lookup structures */ +#include "inputstr.h" #include <X11/extensions/xtrapdi.h> #include <X11/extensions/xtrapddmi.h> #include <X11/extensions/xtrapproto.h> @@ -101,7 +102,7 @@ globalref int_function XETrapProcVector[256L]; /* The "shadowed" ProcVector */ #ifndef VECTORED_EVENTS globalref int_function EventProcVector[XETrapCoreEvents]; #else -extern WindowPtr GetCurrentRootWindow(); +extern WindowPtr GetCurrentRootWindow(DeviceIntPtr); globalref int_function EventProcVector[128L]; #endif static int_function keybd_process_inp = NULL; /* Used for VECTORED_EVENTS */ @@ -1564,7 +1565,7 @@ void XETrapStampAndMail(xEvent *x_event) data.u.event.u.u.type == ButtonRelease || data.u.event.u.u.type == KeyPress || data.u.event.u.u.type == KeyRelease)) { - int scr = XineramaGetCursorScreen(); + int scr = XineramaGetCursorScreen(inputInfo.pointer); data.u.event.u.keyButtonPointer.rootX += panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x; data.u.event.u.keyButtonPointer.rootY += @@ -1619,7 +1620,9 @@ int XETrapEventVector(ClientPtr client, xEvent *x_event) (x_event->u.u.type <= MotionNotify) && (!x_event->u.keyButtonPointer.sameScreen))) { /* we've moved/warped to another screen */ - WindowPtr root_win = GetCurrentRootWindow(); + /* XXX: we're getting the client's pointer root window. + * is this correct? Should it be the client's keyboard? */ + WindowPtr root_win = GetCurrentRootWindow(PickPointer(client)); current_screen = root_win->drawable.pScreen->myNum; } data.hdr.screen = current_screen; |