diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-08-04 00:51:06 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-09-29 17:44:07 +0200 |
commit | 25cbfd14f01bf2cdeb7504a5d8a3b03d924e243f (patch) | |
tree | b11c47e0e8610df545da60a0fdf3ee36ede46c03 /nx-X11/programs | |
parent | 7d06837013e7265d343adccb73dc22b76722a24f (diff) | |
download | nx-libs-25cbfd14f01bf2cdeb7504a5d8a3b03d924e243f.tar.gz nx-libs-25cbfd14f01bf2cdeb7504a5d8a3b03d924e243f.tar.bz2 nx-libs-25cbfd14f01bf2cdeb7504a5d8a3b03d924e243f.zip |
Clipboard.c: merge endTransfer and nxagentSendSelectionNotify
endTransfer is the only caller
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 37 |
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. */ |