From 63a788caa35b080bde1307fc6d5715dec091fe38 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 2 Jul 2010 12:44:32 +0000 Subject: git update 2/7/2010 --- xorg-server/xkb/xkbAccessX.c | 39 ++++++++++----------------------------- xorg-server/xkb/xkbActions.c | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 36 deletions(-) (limited to 'xorg-server/xkb') diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c index 22178b862..70b1c6013 100644 --- a/xorg-server/xkb/xkbAccessX.c +++ b/xorg-server/xkb/xkbAccessX.c @@ -710,40 +710,21 @@ DeviceEvent *event = &ev->device_event; if (xkbi) { xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7)); - /* Merge this MD's lockedPtrButtons with the one of all - * attached slave devices. - * The DIX uses a merged button state for MDs, not - * releasing buttons until the last SD has released - * thenm. If we unconditionally clear the - * lockedPtrButtons bit on the MD, a PointerKeys button - * release on the SD keyboard won't generate the required fake button - * event on the XTEST pointer, thus never processing the - * button event in the DIX and the XTEST pointer's - * buttons stay down - result is a stuck button. - */ - if (IsMaster(dev)) - XkbMergeLockedPtrBtns(dev); + if (IsMaster(dev)) + { + DeviceIntPtr source; + int rc; + rc = dixLookupDevice(&source, event->sourceid, serverClient, DixWriteAccess); + if (rc != Success) + ErrorF("[xkb] bad sourceid '%d' on button release event.\n", event->sourceid); + else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER))) + XkbFakeDeviceButton(dev, FALSE, event->detail.key); + } } changed |= XkbPointerButtonMask; } - /* Guesswork. mostly. - * xkb actuall goes through some effort to transparently wrap the - * processInputProcs (see XkbSetExtension). But we all love fun, so the - * previous XKB implementation just hardcoded the CPPE call here instead - * of unwrapping like anybody with any sense of decency would do. - * I got no clue what the correct thing to do is, but my guess is that - * it's not hardcoding. I may be wrong. whatever it is, don't come whining - * to me. I just work here. - * - * Anyway. here's the old call, if you don't like the wrapping, revert it. - * - * CoreProcessPointerEvent(xE,mouse,count); - * - * see. it's still steaming. told you. (whot) - */ - UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc); mouse->public.processInputProc(ev, mouse); COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, diff --git a/xorg-server/xkb/xkbActions.c b/xorg-server/xkb/xkbActions.c index 1274f4871..24c7341ed 100644 --- a/xorg-server/xkb/xkbActions.c +++ b/xorg-server/xkb/xkbActions.c @@ -41,11 +41,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkb.h" #include #include "mi.h" +#include "mipointer.h" #define EXTENSION_EVENT_BASE 64 DevPrivateKeyRec xkbDevicePrivateKeyRec; -static void XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button); +void XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button); static void XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y); void @@ -500,9 +501,6 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi, int x,y; Bool accel; - if (xkbi->device == inputInfo.keyboard) - return 0; - if (filter->keycode==0) { /* initial press */ filter->keycode = keycode; filter->active = 1; @@ -1340,12 +1338,16 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y) EventListPtr events; int nevents, i; DeviceIntPtr ptr; + ScreenPtr pScreen; + Bool saveWait; int gpe_flags = 0; - if (!dev->u.master) + if (IsMaster(dev)) + ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER)); + else if (!dev->u.master) ptr = dev; else - ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER)); + return; if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY) gpe_flags = POINTER_ABSOLUTE; @@ -1354,9 +1356,12 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y) events = InitEventList(GetMaximumEventsNum()); OsBlockSignals(); + pScreen = miPointerGetScreen(ptr); + saveWait = miPointerSetWaitForUpdate(pScreen, FALSE); nevents = GetPointerEvents(events, ptr, MotionNotify, 0, gpe_flags, 0, 2, (int[]){x, y}); + miPointerSetWaitForUpdate(pScreen, saveWait); OsReleaseSignals(); for (i = 0; i < nevents; i++) @@ -1365,7 +1370,7 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y) FreeEventList(events, GetMaximumEventsNum()); } -static void +void XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button) { EventListPtr events; -- cgit v1.2.3