diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-22 16:03:06 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-06-22 16:05:48 +0200 |
commit | 3aabc92cf81f20b89dc49e8db3c56ad9fa08481b (patch) | |
tree | 4356a989e631c00f23dd12bce627b04c6e1172a9 /nx-X11/programs/Xserver/xkb | |
parent | abf3741362f4c200945db6403fcd54df6754d4af (diff) | |
download | nx-libs-3aabc92cf81f20b89dc49e8db3c56ad9fa08481b.tar.gz nx-libs-3aabc92cf81f20b89dc49e8db3c56ad9fa08481b.tar.bz2 nx-libs-3aabc92cf81f20b89dc49e8db3c56ad9fa08481b.zip |
rework xkb device private handling
We can only free the xkbDevicePrivate because we do not know the
details of any other (possible) extension. So let's limit to that one
private for now and call the new xkbFreePrivates from dix (where such
a function is completely missing).
Diffstat (limited to 'nx-X11/programs/Xserver/xkb')
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkbActions.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c index 90bad93e0..a39e5c8f2 100644 --- a/nx-X11/programs/Xserver/xkb/xkbActions.c +++ b/nx-X11/programs/Xserver/xkb/xkbActions.c @@ -81,6 +81,20 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) proc,xkbUnwrapProc); } +void +XkbFreePrivates(DeviceIntPtr device) +{ + if (device && + device->devPrivates && + device->nPrivates > 0 && + xkbDevicePrivateIndex != -1 && + xkbDevicePrivateIndex < device->nPrivates) + { + free(device->devPrivates[xkbDevicePrivateIndex].ptr); + device->devPrivates[xkbDevicePrivateIndex].ptr = NULL; + } +} + #ifdef XINPUT extern void ProcessOtherEvent( xEvent * /* xE */, |