From 2161fa2bd0f838be525d136a726aef088bc69292 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 15 Nov 2019 21:48:43 +0100 Subject: Clipboard.c: improve XChangeProperty code The previously used "Atom" type was confusing. Clarify this by writing the code as requested in the manpage of XChangeProperty: "If the specified format is 8, the property data must be a char array. If the specified format is 16, the property data must be a short array. If the specified format is 32, the property data must be a long array." --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 5f7bdab4e..10d98fe88 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -725,7 +725,7 @@ void nxagentRequestSelection(XEvent *X) * FIXME: these must be external Atoms! */ - Atom targets[] = {XA_STRING}; + long targets[] = {XA_STRING}; int numTargets = 1; #ifdef DEBUG @@ -743,7 +743,7 @@ void nxagentRequestSelection(XEvent *X) X->xselectionrequest.requestor, X->xselectionrequest.property, XInternAtom(nxagentDisplay, "ATOM", 0), - sizeof(Atom)*8, + 32, PropModeReplace, (unsigned char*)&targets, numTargets); -- cgit v1.2.3