diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-12-28 21:02:14 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-01-05 22:52:53 +0100 |
commit | 427b7b9777727df4115e3e9e6e63d5176fb0b495 (patch) | |
tree | 1d319a61f55dd6132c17b5e7cb45b4585c3b6160 /nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | |
parent | a261b72435d7d30dbe36529a51fc53f6ade34dff (diff) | |
download | nx-libs-427b7b9777727df4115e3e9e6e63d5176fb0b495.tar.gz nx-libs-427b7b9777727df4115e3e9e6e63d5176fb0b495.tar.bz2 nx-libs-427b7b9777727df4115e3e9e6e63d5176fb0b495.zip |
nxagent: Use XlibAtom data type where appropriate
XlibAtom should be used wherever remote atoms are handled. This is
important as Xlib data types and server data types of the same name do
not always have identical sizes.
See also https://lists.freedesktop.org/archives/xorg-devel/2015-August/047245.html
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Keyboard.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index faabb2ebe..c145e4dba 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1355,25 +1355,21 @@ static void nxagentXkbGetNames(void) if (nxagentRemoteRules) return; - Atom atom = XInternAtom(nxagentDisplay, "_XKB_RULES_NAMES", 1); + XlibAtom rulesprop = XInternAtom(nxagentDisplay, "_XKB_RULES_NAMES", 1); - if (atom == 0) + if (rulesprop == 0) { return; } - #ifdef _XSERVER64 - Atom64 type; - #else - Atom type; - #endif + XlibAtom type; int format; unsigned long n; unsigned long after; char *data = NULL; Status result = XGetWindowProperty(nxagentDisplay, DefaultRootWindow(nxagentDisplay), - atom, 0, 256, 0, XA_STRING, &type, &format, + rulesprop, 0, 256, 0, XA_STRING, &type, &format, &n, &after, (unsigned char **)&data); if (result != Success || !data) |