aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-06-30 12:37:04 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-06-30 12:37:04 +0200
commit314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c (patch)
tree4ca541c9c14b9b015e5f12227e784a7a418d8d9a /nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
parente18eb77f397b72c1a10141d2bafa2dc975ab7d38 (diff)
parent8f3b446b1336d2c54690468c062c3098df96ba96 (diff)
downloadnx-libs-314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c.tar.gz
nx-libs-314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c.tar.bz2
nx-libs-314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c.zip
Merge branch 'uli42-pr/various10' into 3.6.x
Attribute GH PR #1075: https://github.com/ArcticaProject/nx-libs/pull/1075
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 91fe5679f..12b18e366 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -329,9 +329,11 @@ static void resetSelectionOwnerOnXServer(void);
#endif
static void initSelectionOwnerData(int index);
static void clearSelectionOwnerData(int index);
-static void storeSelectionOwnerData(int index, Selection *sel);
static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow);
+#ifdef NXAGENT_CLIPBOARD
static void setSelectionOwnerOnXServer(Selection *pSelection);
+static void storeSelectionOwnerData(int index, Selection *sel);
+#endif
static int sendEventToClient(ClientPtr client, xEvent *pEvents);
static void sendSelectionNotifyEventToClient(ClientPtr client,
Time time,
@@ -709,6 +711,7 @@ static void clearSelectionOwnerData(int index)
lastSelectionOwner[index].lastTimeChanged = ClientTimeToServerTime(CurrentTime);
}
+#ifdef NXAGENT_CLIPBOARD
static void storeSelectionOwnerData(int index, Selection *sel)
{
lastSelectionOwner[index].client = sel->client;
@@ -716,6 +719,7 @@ static void storeSelectionOwnerData(int index, Selection *sel)
lastSelectionOwner[index].windowPtr = sel->pWin;
lastSelectionOwner[index].lastTimeChanged = ClientTimeToServerTime(CurrentTime);
}
+#endif
static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow)
{
@@ -1969,14 +1973,14 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
#endif
/*
- * The state machine is able to work in two phases. In the first
- * phase we get the size of property data, in the second we get
- * the actual data. We save a round-trip by requesting a prede-
- * termined amount of data in a single GetProperty and by discar-
- * ding the remaining part. This is not the optimal solution (we
- * could get the remaining part if it doesn't fit in a single
- * reply) but, at least with text, it should work in most situa-
- * tions.
+ * The state machine is able to work in two phases. In the
+ * first phase we get the size of property data, in the second
+ * we get the actual data. We save a round-trip by requesting
+ * a predetermined amount of data in a single GetProperty and
+ * by discar- ding the remaining part. This is not the optimal
+ * solution (we could get the remaining part if it doesn't fit
+ * in a single reply) but, at least with text, it should work
+ * in most situations.
*/
setClientSelectionStage(index, SelectionStageQueryData);
@@ -2369,7 +2373,6 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
}
}
}
-#endif
/*
* This is called from the nxagentSetSelectionCallback, so it is using
@@ -2468,6 +2471,7 @@ FIXME2: instead of XGetSelectionOwner we could check if the Xfixes
}
*/
}
+#endif
/*
* This is called from dix (ProcConvertSelection) if an nxagent client