From 4f359e2667373a3caeb8466975f10137db3b0daf Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 23 Aug 2019 09:36:17 -0400 Subject: [PATCH] Temporarily revert the XA_CLIPBOARD support, since UTF-8 isn't working there. --- x11new/x11.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/x11new/x11.c b/x11new/x11.c index 358e1dfd..6ab466e0 100644 --- a/x11new/x11.c +++ b/x11new/x11.c @@ -1615,11 +1615,9 @@ static void _get_selection(Widget w, XtPointer data, Atom *selection, void XC_get_selection(void) { - Atom XA_CLIPBOARD = XInternAtom(XtDisplay(topLevel), "CLIPBOARD", 0); - XC_LOG(("XC_get_selection() - called\n")); - XtGetSelectionValue(topLevel, XA_CLIPBOARD, + XtGetSelectionValue(topLevel, XA_PRIMARY, #ifdef PDC_WIDE XA_UTF8_STRING(XtDisplay(topLevel)), #else @@ -1634,7 +1632,6 @@ int XC_set_selection(const char *contents, long length) { long pos; int status; - Atom XA_CLIPBOARD = XInternAtom(XtDisplay(topLevel), "CLIPBOARD", 0); XC_LOG(("XC_set_selection() - called\n")); @@ -1652,9 +1649,7 @@ int XC_set_selection(const char *contents, long length) tmpsel_length = length; tmpsel[length] = 0; - if (XtOwnSelection(topLevel, XA_CLIPBOARD, CurrentTime, - _convert_proc, _lose_ownership, NULL) == False || - XtOwnSelection(topLevel, XA_PRIMARY, CurrentTime, + if (XtOwnSelection(topLevel, XA_PRIMARY, CurrentTime, _convert_proc, _lose_ownership, NULL) == False) { status = PDC_CLIP_ACCESS_ERROR;