diff options
author | marha <marha@users.sourceforge.net> | 2014-03-21 19:36:05 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-21 19:36:05 +0100 |
commit | 41fea4472dec859ddec76bdfa7108ebec71de1e3 (patch) | |
tree | 385ccec6dc105acc75169122d4e0714046cfbbd5 /xorg-server/xkb/xkbUtils.c | |
parent | cd8b0d0de3fcb53f6d3ece8ce26d97aaab2c0914 (diff) | |
download | vcxsrv-41fea4472dec859ddec76bdfa7108ebec71de1e3.tar.gz vcxsrv-41fea4472dec859ddec76bdfa7108ebec71de1e3.tar.bz2 vcxsrv-41fea4472dec859ddec76bdfa7108ebec71de1e3.zip |
xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014
xserver commit 4fb31e4824d46edc80bb49b4065152899faa5ac6
libxcb commit cb686b576739deea00180c54697c8b62b8419ae0
libX11 commit 8be4610939b833587954957f5963eb4191b43d19
libXext commit 11aad96bd689d54156064d2e81213dc827a689d1
fontconfig commit 5478192f379d784b421329e4bf72cc780818e467
mesa commit 8d8d0cb09eb8735a04fc36cc4d0e2dc9f9d460eb
Diffstat (limited to 'xorg-server/xkb/xkbUtils.c')
-rw-r--r-- | xorg-server/xkb/xkbUtils.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c index 6c6af60f0..6cf6e79df 100644 --- a/xorg-server/xkb/xkbUtils.c +++ b/xorg-server/xkb/xkbUtils.c @@ -1999,28 +1999,28 @@ XkbCopyKeymap(XkbDescPtr dst, XkbDescPtr src) } Bool -XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src) +XkbDeviceApplyKeymap(DeviceIntPtr dst, XkbDescPtr desc) { xkbNewKeyboardNotify nkn; Bool ret; - if (!dst->key || !src->key) + if (!dst->key || !desc) return FALSE; memset(&nkn, 0, sizeof(xkbNewKeyboardNotify)); nkn.oldMinKeyCode = dst->key->xkbInfo->desc->min_key_code; nkn.oldMaxKeyCode = dst->key->xkbInfo->desc->max_key_code; nkn.deviceID = dst->id; - nkn.oldDeviceID = dst->id; /* maybe src->id? */ - nkn.minKeyCode = src->key->xkbInfo->desc->min_key_code; - nkn.maxKeyCode = src->key->xkbInfo->desc->max_key_code; + nkn.oldDeviceID = dst->id; + nkn.minKeyCode = desc->min_key_code; + nkn.maxKeyCode = desc->max_key_code; nkn.requestMajor = XkbReqCode; nkn.requestMinor = X_kbSetMap; /* Near enough's good enough. */ nkn.changed = XkbNKN_KeycodesMask; - if (src->key->xkbInfo->desc->geom) + if (desc->geom) nkn.changed |= XkbNKN_GeometryMask; - ret = XkbCopyKeymap(dst->key->xkbInfo->desc, src->key->xkbInfo->desc); + ret = XkbCopyKeymap(dst->key->xkbInfo->desc, desc); if (ret) XkbSendNewKeyboardNotify(dst, &nkn); @@ -2090,3 +2090,26 @@ XkbMergeLockedPtrBtns(DeviceIntPtr master) xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons; } } + +void +XkbCopyControls(XkbDescPtr dst, XkbDescPtr src) +{ + int i, nG, nTG; + + if (!dst || !src) + return; + + *dst->ctrls = *src->ctrls; + + for (nG = nTG = 0, i = dst->min_key_code; i <= dst->max_key_code; i++) { + nG = XkbKeyNumGroups(dst, i); + if (nG >= XkbNumKbdGroups) { + nTG = XkbNumKbdGroups; + break; + } + if (nG > nTG) { + nTG = nG; + } + } + dst->ctrls->num_groups = nTG; +} |