diff options
author | marha <marha@users.sourceforge.net> | 2014-03-21 22:50:26 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-21 22:56:24 +0100 |
commit | eb71c0f23999d1cc156e1821d73634ec79621fc2 (patch) | |
tree | d45d551ada10b1bfb3d57517c892770734a77817 /xorg-server/xkb/xkbUtils.c | |
parent | ab3d257d88f67e169a314ad0fac851fc2fc6cb05 (diff) | |
parent | 41fea4472dec859ddec76bdfa7108ebec71de1e3 (diff) | |
download | vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.gz vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.tar.bz2 vcxsrv-eb71c0f23999d1cc156e1821d73634ec79621fc2.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
xserver fontconfig libX11 libXext libxcb mesa git update 21 Mar 2014
Conflicts:
libxcb/src/xcb_auth.c
libxcb/src/xcb_conn.c
libxcb/src/xcb_util.c
libxcb/src/xcb_windefs.h
mesalib/src/mapi/glapi/glapi.h
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; +} |