diff options
author | marha <marha@users.sourceforge.net> | 2011-06-08 08:28:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-06-08 08:28:34 +0200 |
commit | 414e95994496b7026621c7e4f6d01b364b5252b7 (patch) | |
tree | 23c211fb0873aaf6eb1be02a37c467f02e3bd40b /xorg-server | |
parent | 4dc4001b1b78cc236548d9a01365ee4c04ee22a3 (diff) | |
parent | adeb8256da9b636648178f729d7b3316a0a8e990 (diff) | |
download | vcxsrv-414e95994496b7026621c7e4f6d01b364b5252b7.tar.gz vcxsrv-414e95994496b7026621c7e4f6d01b364b5252b7.tar.bz2 vcxsrv-414e95994496b7026621c7e4f6d01b364b5252b7.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libX11/specs/libX11/AppC.xml
libX11/specs/libX11/AppD.xml
libX11/specs/libX11/CH02.xml
libX11/specs/libX11/CH03.xml
libX11/specs/libX11/CH04.xml
libX11/specs/libX11/CH05.xml
libX11/specs/libX11/CH06.xml
libX11/specs/libX11/CH07.xml
libX11/specs/libX11/CH08.xml
libX11/specs/libX11/CH09.xml
libX11/specs/libX11/CH11.xml
libX11/specs/libX11/CH13.xml
libX11/specs/libX11/CH14.xml
libX11/specs/libX11/CH15.xml
libX11/specs/libX11/CH16.xml
mesalib/src/mesa/main/fbobject.c
xorg-server/Xi/exevents.c
xorg-server/dix/events.c
xorg-server/dix/getevents.c
xorg-server/test/input.c
xorg-server/xkb/xkbfmisc.c
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/Xi/exevents.c | 4 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 6 | ||||
-rw-r--r-- | xorg-server/dix/getevents.c | 43 | ||||
-rw-r--r-- | xorg-server/test/input.c | 3 | ||||
-rw-r--r-- | xorg-server/xkb/xkbfmisc.c | 7 |
5 files changed, 41 insertions, 22 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 0ae4f8888..7152d0c64 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -892,8 +892,8 @@ ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
if (i != Success)
{
- ErrorF("[Xi] %s: XI2 conversion failed in ProcessRawEvent (%d)\n",
- device->name, i);
+ ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n",
+ __func__, device->name, i);
return;
}
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 1c8ec53a4..1a427ea55 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -432,7 +432,7 @@ GetEventFilter(DeviceIntPtr dev, xEvent *event) return filters[dev ? dev->id : 0][event->u.u.type];
else if ((evtype = xi2_get_type(event)))
return (1 << (evtype % 8));
- ErrorF("[dix] Unknown device type %d. No filter\n", event->u.u.type);
+ ErrorF("[dix] Unknown event type %d. No filter\n", event->u.u.type);
return 0;
}
@@ -1424,7 +1424,7 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) static void
DetachFromMaster(DeviceIntPtr dev)
{
- if (!IsFloating(dev))
+ if (IsFloating(dev))
return;
dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id;
@@ -4003,7 +4003,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, rc = EventToXI2(event, &xi2);
if (rc == Success)
{
- int evtype = ((xGenericEvent*)xi2)->evtype;
+ int evtype = xi2_get_type(xi2);
mask = grab->xi2mask[XIAllDevices][evtype/8] |
grab->xi2mask[XIAllMasterDevices][evtype/8] |
grab->xi2mask[thisDev->id][evtype/8];
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c index 2cd36f3d1..56b3d6128 100644 --- a/xorg-server/dix/getevents.c +++ b/xorg-server/dix/getevents.c @@ -879,7 +879,7 @@ positionSprite(DeviceIntPtr dev, int mode, * to the current screen. */
miPointerSetPosition(dev, mode, screenx, screeny);
- if(!IsMaster(dev) || !IsFloating(dev)) {
+ if(!IsMaster(dev) && !IsFloating(dev)) {
DeviceIntPtr master = GetMaster(dev, MASTER_POINTER);
master->last.valuators[0] = *screenx;
master->last.valuators[1] = *screeny;
@@ -926,7 +926,7 @@ updateHistory(DeviceIntPtr dev, ValuatorMask *mask, CARD32 ms) return;
updateMotionHistory(dev, ms, mask, dev->last.valuators);
- if(!IsMaster(dev) || !IsFloating(dev))
+ if(!IsMaster(dev) && !IsFloating(dev))
{
DeviceIntPtr master = GetMaster(dev, MASTER_POINTER);
updateMotionHistory(master, ms, mask, dev->last.valuators);
@@ -1067,8 +1067,12 @@ FreeEventList(InternalEvent *list, int num_events) free(list);
}
+/**
+ * Transform vector x/y according to matrix m and drop the rounded coords
+ * back into x/y.
+ */
static void
-transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask, int *x, int *y)
+transform(struct pixman_f_transform *m, int *x, int *y)
{
struct pixman_f_vector p;
@@ -1076,12 +1080,32 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask, int *x, int *y) p.v[1] = *y;
p.v[2] = 1;
- pixman_f_transform_point(&dev->transform, &p);
+ pixman_f_transform_point(m, &p);
+
*x = lround(p.v[0]);
*y = lround(p.v[1]);
}
+static void
+transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
+{
+ int x, y, ox, oy;
+
+ ox = x = valuator_mask_isset(mask, 0) ? valuator_mask_get(mask, 0) :
+ dev->last.valuators[0];
+ oy = y = valuator_mask_isset(mask, 1) ? valuator_mask_get(mask, 1) :
+ dev->last.valuators[1];
+
+ transform(&dev->transform, &x, &y);
+
+ if (valuator_mask_isset(mask, 0) || ox != x)
+ valuator_mask_set(mask, 0, x);
+
+ if (valuator_mask_isset(mask, 1) || oy != y)
+ valuator_mask_set(mask, 1, y);
+}
+
/**
* Generate internal events representing this pointer event and enqueue them
* on the event queue.
@@ -1194,16 +1218,7 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons }
}
- x = (valuator_mask_isset(&mask, 0) ? valuator_mask_get(&mask, 0) :
- pDev->last.valuators[0]);
- y = (valuator_mask_isset(&mask, 1) ? valuator_mask_get(&mask, 1) :
- pDev->last.valuators[1]);
- transformAbsolute(pDev, &mask, &x, &y);
- if (valuator_mask_isset(&mask, 0))
- valuator_mask_set(&mask, 0, x);
- if (valuator_mask_isset(&mask, 1))
- valuator_mask_set(&mask, 1, y);
-
+ transformAbsolute(pDev, &mask);
moveAbsolute(pDev, &x, &y, &mask);
} else {
if (flags & POINTER_ACCELERATE) {
diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c index a54feffec..87c752a7f 100644 --- a/xorg-server/test/input.c +++ b/xorg-server/test/input.c @@ -1223,8 +1223,11 @@ static void dix_valuator_alloc(void) assert(v);
assert(v->numAxes == num_axes);
+#ifndef __i386__
+ /* must be double-aligned on 64 bit */
assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
+#endif
num_axes ++;
}
diff --git a/xorg-server/xkb/xkbfmisc.c b/xorg-server/xkb/xkbfmisc.c index 0d95b17ff..a2e4b50b9 100644 --- a/xorg-server/xkb/xkbfmisc.c +++ b/xorg-server/xkb/xkbfmisc.c @@ -62,7 +62,7 @@ unsigned set,rtrn; rtrn|= _XkbKSUpper;
}
if (((ks>=XK_a)&&(ks<=XK_z))||
- ((ks>=XK_agrave)&&(ks<=XK_ydiaeresis))) {
+ ((ks>=XK_ssharp)&&(ks<=XK_ydiaeresis)&&(ks!=XK_division))) {
rtrn|= _XkbKSLower;
}
break;
@@ -71,7 +71,7 @@ unsigned set,rtrn; ((ks>=XK_Racute)&&(ks<=XK_Tcedilla))) {
rtrn|= _XkbKSUpper;
}
- if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_caron))||
+ if (((ks>=XK_aogonek)&&(ks<=XK_zabovedot)&&(ks!=XK_ogonek)&&(ks!=XK_caron)&&(ks!=XK_doubleacute))||
((ks>=XK_racute)&&(ks<=XK_tcedilla))) {
rtrn|= _XkbKSLower;
}
@@ -92,7 +92,8 @@ unsigned set,rtrn; ((ks>=XK_Amacron)&&(ks<=XK_Umacron))) {
rtrn|= _XkbKSUpper;
}
- if (((ks>=XK_rcedilla)&&(ks<=XK_tslash))||
+ if ((ks==XK_kra)||
+ ((ks>=XK_rcedilla)&&(ks<=XK_tslash))||
(ks==XK_eng)||
((ks>=XK_amacron)&&(ks<=XK_umacron))) {
rtrn|= _XkbKSLower;
|