aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-10-26 23:18:27 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:51 +0200
commit533f08ddb9748c20bd736f356c3a7fe38f53a113 (patch)
treea0e6b851a1f2b4d092fb6f15326a0b4dbfec0a39 /nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
parentba02ad3ad65eb353734aafd6e394683c57fbe070 (diff)
downloadnx-libs-533f08ddb9748c20bd736f356c3a7fe38f53a113.tar.gz
nx-libs-533f08ddb9748c20bd736f356c3a7fe38f53a113.tar.bz2
nx-libs-533f08ddb9748c20bd736f356c3a7fe38f53a113.zip
Clipboard.c: add TARGET_SIZES
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 9dc5f8ad7..dd8b049db 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -154,6 +154,7 @@ static XlibAtom serverDELETE;
static XlibAtom serverINSERT_SELECTION;
static XlibAtom serverINSERT_PROPERTY;
static XlibAtom serverSAVE_TARGETS;
+static XlibAtom serverTARGET_SIZES;
static XlibAtom serverTEXT;
static XlibAtom serverCOMPOUND_TEXT;
static XlibAtom serverUTF8_STRING;
@@ -166,6 +167,7 @@ static Atom clientDELETE;
static Atom clientINSERT_SELECTION;
static Atom clientINSERT_PROPERTY;
static Atom clientSAVE_TARGETS;
+static Atom clientTARGET_SIZES;
static Atom clientTEXT;
static Atom clientCOMPOUND_TEXT;
static Atom clientUTF8_STRING;
@@ -179,6 +181,7 @@ static char szAgentDELETE[] = "DELETE";
static char szAgentINSERT_SELECTION[] = "INSERT_SELECTION";
static char szAgentINSERT_PROPERTY[] = "INSERT_PROPERTY";
static char szAgentSAVE_TARGETS[] = "SAVE_TARGETS";
+static char szAgentTARGET_SIZES[] = "TARGET_SIZES";
static char szAgentCOMPOUND_TEXT[] = "COMPOUND_TEXT";
static char szAgentUTF8_STRING[] = "UTF8_STRING";
static char szAgentNX_CUT_BUFFER_CLIENT[] = "NX_CUT_BUFFER_CLIENT";
@@ -871,6 +874,14 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X)
replyRequestSelectionToXServer(X, False);
return;
}
+ else if (X->xselectionrequest.target == serverTARGET_SIZES)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "%s: (currently) unsupported target [TARGET_SIZES] - denying request.\n", __func__);
+ #endif
+ replyRequestSelectionToXServer(X, False);
+ return;
+ }
else
{
fprintf(stderr, "%s: target [%ld][%s].\n", __func__, X->xselectionrequest.target,
@@ -2062,6 +2073,14 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
sendSelectionNotifyEventToClient(client, time, requestor, selection, target, None);
return 1;
}
+ else if (target == clientTARGET_SIZES)
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "%s: (currently) unsupported target [TARGET_SIZES] - denying request.\n", __func__);
+ #endif
+ sendSelectionNotifyEventToClient(client, time, requestor, selection, target, None);
+ return 1;
+ }
if (lastClients[index].clientPtr == client)
{
@@ -2378,6 +2397,7 @@ Bool nxagentInitClipboard(WindowPtr pWin)
clientINSERT_SELECTION = MakeAtom(szAgentINSERT_SELECTION, strlen(szAgentINSERT_SELECTION), True);
clientINSERT_PROPERTY = MakeAtom(szAgentINSERT_PROPERTY, strlen(szAgentINSERT_PROPERTY), True);
clientSAVE_TARGETS = MakeAtom(szAgentSAVE_TARGETS, strlen(szAgentSAVE_TARGETS), True);
+ clientTARGET_SIZES = MakeAtom(szAgentTARGET_SIZES, strlen(szAgentTARGET_SIZES), True);
SAFE_free(lastSelectionOwner);
lastSelectionOwner = (SelectionOwner *) malloc(nxagentMaxSelections * sizeof(SelectionOwner));
@@ -2438,6 +2458,7 @@ Bool nxagentInitClipboard(WindowPtr pWin)
serverINSERT_SELECTION = nxagentAtoms[20]; /* INSERT_SELECTION */
serverINSERT_PROPERTY = nxagentAtoms[21]; /* INSERT_PROPERTY */
serverSAVE_TARGETS = nxagentAtoms[22]; /* SAVE_TARGETS */
+ serverTARGET_SIZES = nxagentAtoms[23]; /* TARGET_SIZES */
/*
* Server side properties to hold pasted data.