aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-06-18 00:23:30 +0200
committerUlrich Sibiller <uli42@gmx.de>2021-06-21 22:34:26 +0200
commiteae0eff3aa5c8e3601677e8395fea72be231b554 (patch)
tree122221b48839c525cd4754e5a1989c1479c89f02 /nx-X11
parent289ac3dfd3b0f9bcefff15eb80dd04dccb0a1051 (diff)
downloadnx-libs-eae0eff3aa5c8e3601677e8395fea72be231b554.tar.gz
nx-libs-eae0eff3aa5c8e3601677e8395fea72be231b554.tar.bz2
nx-libs-eae0eff3aa5c8e3601677e8395fea72be231b554.zip
Clipboard.c: improve some comments
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 735a9379a..85ef1ae16 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -97,6 +97,13 @@ const int nxagentMaxSelections = 2;
static XlibAtom *remoteSelectionAtoms = NULL;
static Atom *localSelelectionAtoms = NULL;
+/*
+ * The real owner window (inside nxagent) is stored in
+ * lastSelectionOwner[index].window.
+ * lastSelectionOwner[index].windowPtr points to the struct that
+ * contains all information about the owner window.
+ * lastTimeChanged is always a local time.
+ */
typedef struct _SelectionOwner
{
ClientPtr client; /* local client */
@@ -106,9 +113,8 @@ typedef struct _SelectionOwner
} SelectionOwner;
/*
- * This contains the last selection owner in nxagent. The
- * lastTimeChanged is always a local time. If .client is NULL the
- * owner is outside nxagent.
+ * This contains the last selection owner for each selection. If
+ * .client is NULL the owner is outside nxagent or there is no owner.
*/
static SelectionOwner *lastSelectionOwner = NULL;
@@ -717,6 +723,7 @@ static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow)
* Attention: does not work properly when both client AND window
* are passed as setClientSelectionStage(None) will also clear
* the lastClientWindowPtr!
+ * This is only called from Client.c and Window.c
*/
void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
{