diff options
author | marha <marha@users.sourceforge.net> | 2013-07-12 08:25:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-12 08:25:37 +0200 |
commit | 66b46719d55e60d53b42858770d6ac40d079ab13 (patch) | |
tree | aad06d011ed8b820685f72ada34e56ee0f2580c6 /xorg-server | |
parent | f8f0209a691e0d0838d1ef9d602ebacafee2a233 (diff) | |
parent | ffce4319c2fb6f4f663cc5a9660e1d5837fcde87 (diff) | |
download | vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.tar.gz vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.tar.bz2 vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libxtrans fontconfig mesa xserver git update 12 Jul 2013
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/Xi/exevents.c | 35 | ||||
-rwxr-xr-x | xorg-server/dix/events.c | 11 | ||||
-rwxr-xr-x | xorg-server/os/log.c | 3 | ||||
-rw-r--r-- | xorg-server/xkb/xkbInit.c | 6 |
4 files changed, 39 insertions, 16 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 6c40df494..1bf7fd2f8 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1225,9 +1225,13 @@ ProcessTouchOwnershipEvent(TouchOwnershipEvent *ev, else if (ev->reason == XIAcceptTouch) { int i; - /* Go through the motions of ending the touch if the listener has + + /* For pointer-emulated listeners that ungrabbed the active grab, + * the state was forced to LISTENER_HAS_END. Still go + * through the motions of ending the touch if the listener has * already seen the end. This ensures that the touch record is ended in - * the server. */ + * the server. + */ if (ti->listeners[0].state == LISTENER_HAS_END) TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[0].listener); @@ -1887,16 +1891,23 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, if (listener->type == LISTENER_POINTER_REGULAR || listener->type == LISTENER_POINTER_GRAB) { - rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, - grab, xi2mask); - - /* Once we send a TouchEnd to a legacy listener, we're already well - * past the accepting/rejecting stage (can only happen on - * GrabModeSync + replay. This listener now gets the end event, - * and we can continue. - */ - if (rc == Success) - listener->state = LISTENER_HAS_END; + /* Note: If the active grab was ungrabbed, we already changed the + * state to LISTENER_HAS_END but still get here. So we mustn't + * actually send the event. + * This is part two of the hack in DeactivatePointerGrab + */ + if (listener->state != LISTENER_HAS_END) { + rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, + grab, xi2mask); + + /* Once we send a TouchEnd to a legacy listener, we're already well + * past the accepting/rejecting stage (can only happen on + * GrabModeSync + replay. This listener now gets the end event, + * and we can continue. + */ + if (rc == Success) + listener->state = LISTENER_HAS_END; + } goto out; } diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 0296b7865..a77415377 100755 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -1525,13 +1525,20 @@ DeactivatePointerGrab(DeviceIntPtr mouse) for (i = 0; !wasPassive && mouse->touch && i < mouse->touch->num_touches; i++) { TouchPointInfoPtr ti = mouse->touch->touches + i; if (ti->active && TouchResourceIsOwner(ti, grab_resource)) { + int mode = XIRejectTouch; /* Rejecting will generate a TouchEnd, but we must not emulate a ButtonRelease here. So pretend the listener already has the end event */ if (grab->grabtype == CORE || grab->grabtype == XI || - !xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin)) + !xi2mask_isset(mouse->deviceGrab.grab->xi2mask, mouse, XI_TouchBegin)) { + mode = XIAcceptTouch; + /* NOTE: we set the state here, but + * ProcessTouchOwnershipEvent() will still call + * TouchEmitTouchEnd for this listener. The other half of + * this hack is in DeliverTouchEndEvent */ ti->listeners[0].state = LISTENER_HAS_END; - TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch); + } + TouchListenerAcceptReject(mouse, ti, 0, mode); } } diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c index 7869eb3a3..a85ec9c2e 100755 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -222,6 +222,9 @@ LogInit(const char *fname, const char *backup) free(oldLog); } } + else { + unlink(logFileName); + } if ((logFile = fopen(logFileName, "w")) == NULL) FatalError("Cannot open log file \"%s\"\n", logFileName); setvbuf(logFile, NULL, _IONBF, 0); diff --git a/xorg-server/xkb/xkbInit.c b/xorg-server/xkb/xkbInit.c index c1f1cb405..b7c521b12 100644 --- a/xorg-server/xkb/xkbInit.c +++ b/xorg-server/xkb/xkbInit.c @@ -759,13 +759,15 @@ XkbProcessArguments(int argc, char *argv[], int i) if ((strcmp(argv[i], "-ardelay") == 0) || (strcmp(argv[i], "-ar1") == 0)) { /* -ardelay int */ if (++i >= argc) UseMsg(); - XkbDfltRepeatDelay = (long) atoi(argv[i]); + else + XkbDfltRepeatDelay = (long) atoi(argv[i]); return 2; } if ((strcmp(argv[i], "-arinterval") == 0) || (strcmp(argv[i], "-ar2") == 0)) { /* -arinterval int */ if (++i >= argc) UseMsg(); - XkbDfltRepeatInterval = (long) atoi(argv[i]); + else + XkbDfltRepeatInterval = (long) atoi(argv[i]); return 2; } return 0; |