aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 9064598a6..f5b163720 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -201,7 +201,6 @@ XFixesAgentInfoRec nxagentXFixesInfo = { -1, -1, -1, 0 };
extern Display *nxagentDisplay;
Bool nxagentValidServerTargets(Atom target);
-void nxagentSendSelectionNotify(Atom property);
static void endTransfer(Bool success);
#define SELECTION_SUCCESS True
#define SELECTION_FAULT False
@@ -737,24 +736,6 @@ FIXME: Do we need this?
nxagentPrintClipboardStat("after nxagentRequestSelection");
}
-void nxagentSendSelectionNotify(Atom property)
-{
- if (lastClientClientPtr == NULL)
- {
- #ifdef DEBUG
- fprintf(stderr, "%s: lastClientClientPtr is NULL - doing nothing.\n", __func__);
- #endif
- return;
- }
-
- SendSelectionNotifyEventToClient(lastClientClientPtr,
- lastClientTime,
- lastClientRequestor,
- lastClientSelection,
- lastClientTarget,
- property);
-}
-
/*
* client and resetting the corresponding variables and the state
* machine. If success is False send a None reply, meaning "request
@@ -763,15 +744,21 @@ void nxagentSendSelectionNotify(Atom property)
*/
static void endTransfer(Bool success)
{
- if (success == SELECTION_SUCCESS)
- {
- nxagentSendSelectionNotify(lastClientProperty);
- }
- else
+ if (lastClientClientPtr == NULL)
{
- nxagentSendSelectionNotify(None);
+ #ifdef DEBUG
+ fprintf(stderr, "%s: lastClientClientPtr is NULL - doing nothing.\n", __func__);
+ #endif
+ return;
}
+ SendSelectionNotifyEventToClient(lastClientClientPtr,
+ lastClientTime,
+ lastClientRequestor,
+ lastClientSelection,
+ lastClientTarget,
+ success == SELECTION_SUCCESS ? lastClientProperty : None);
+
/*
* Enable further requests from clients.
*/