aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-10-20 18:03:51 +0000
committermarha <marha@users.sourceforge.net>2010-10-20 18:03:51 +0000
commitc24d80341cb2ccb427ed85a5c149e6d009355f96 (patch)
tree5422d18117fd5d6cacbe33d71aaacd66adfdebd4 /xorg-server
parentbe10ad8a9efe4131c14c2dde36adaf11e7b125aa (diff)
parentf31315aaa8df8630415a9ba6aeeb8b97dcd5094b (diff)
downloadvcxsrv-c24d80341cb2ccb427ed85a5c149e6d009355f96.tar.gz
vcxsrv-c24d80341cb2ccb427ed85a5c149e6d009355f96.tar.bz2
vcxsrv-c24d80341cb2ccb427ed85a5c149e6d009355f96.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/xfree86/common/xf86DGA.c4
-rw-r--r--xorg-server/xkb/xkb.c37
2 files changed, 25 insertions, 16 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c
index 1d46a67d3..9a99a339b 100644
--- a/xorg-server/hw/xfree86/common/xf86DGA.c
+++ b/xorg-server/hw/xfree86/common/xf86DGA.c
@@ -1133,6 +1133,10 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse)
ev.root_x = event->dx;
ev.root_y = event->dy;
ev.corestate = event->state;
+ /* DGA is core only, so valuators.data doesn't actually matter.
+ * Mask must be set for EventToCore to create motion events. */
+ SetBit(ev.valuators.mask, 0);
+ SetBit(ev.valuators.mask, 1);
DeliverGrabbedEvent ((InternalEvent*)&ev, mouse, FALSE);
}
}
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index 89139dc43..755e6f994 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -1677,20 +1677,6 @@ xkbSymMapWireDesc* wire = *wireRtrn;
if (!(XkbKeySymsMask&req->present))
return 1;
CHK_REQ_KEY_RANGE2(0x11,req->firstKeySym,req->nKeySyms,req,(*errorRtrn),0);
- map = &xkb->map->key_sym_map[xkb->min_key_code];
- for (i=xkb->min_key_code;i<(unsigned)req->firstKeySym;i++,map++) {
- register int g,ng,w;
- ng= XkbNumGroups(map->group_info);
- for (w=g=0;g<ng;g++) {
- if (map->kt_index[g]>=(unsigned)nTypes) {
- *errorRtrn = _XkbErrCode4(0x13,i,g,map->kt_index[g]);
- return 0;
- }
- if (mapWidths[map->kt_index[g]]>w)
- w= mapWidths[map->kt_index[g]];
- }
- symsPerKey[i] = w*ng;
- }
for (i=0;i<req->nKeySyms;i++) {
KeySym *pSyms;
register unsigned nG;
@@ -2343,8 +2329,10 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char* va
XkbDescPtr xkb;
int error;
int nTypes = 0, nActions;
- CARD8 mapWidths[XkbMaxLegalKeyCode + 1];
- CARD16 symsPerKey[XkbMaxLegalKeyCode + 1];
+ CARD8 mapWidths[XkbMaxLegalKeyCode + 1] = {0};
+ CARD16 symsPerKey[XkbMaxLegalKeyCode + 1] = {0};
+ XkbSymMapPtr map;
+ int i;
xkbi= dev->key->xkbInfo;
xkb = xkbi->desc;
@@ -2373,6 +2361,23 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char* va
client->errorValue = nTypes;
return BadValue;
}
+
+ /* symsPerKey/mapWidths must be filled regardless of client-side flags */
+ map = &xkb->map->key_sym_map[xkb->min_key_code];
+ for (i=xkb->min_key_code;i<xkb->max_key_code;i++,map++) {
+ register int g,ng,w;
+ ng= XkbNumGroups(map->group_info);
+ for (w=g=0;g<ng;g++) {
+ if (map->kt_index[g]>=(unsigned)nTypes) {
+ client->errorValue = _XkbErrCode4(0x13,i,g,map->kt_index[g]);
+ return 0;
+ }
+ if (mapWidths[map->kt_index[g]]>w)
+ w= mapWidths[map->kt_index[g]];
+ }
+ symsPerKey[i] = w*ng;
+ }
+
if ((req->present & XkbKeySymsMask) &&
(!CheckKeySyms(client,xkb,req,nTypes,mapWidths,symsPerKey,
(xkbSymMapWireDesc **)&values,&error))) {