From 60380a6a5ed99680f86c5daf14bb412b6d3383a4 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 20 Sep 2020 16:41:56 +0200 Subject: Clipboard.c: do not set stage to new value if already set to that value --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 11c6ae013..fddb53b97 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -394,6 +394,15 @@ void nxagentDumpClipboardStat(void) */ static void setClientSelectionStage(int stage) { + if (lastClientStage == stage) + { + #ifdef DEBUG + fprintf(stderr, "%s: selection stage already set to [%s] - doing nothing\n", __func__, + getClientSelectionStageString(lastClientStage)); + #endif + return; + } + #ifdef DEBUG fprintf(stderr, "%s: Changing selection stage from [%s] to [%s]\n", __func__, getClientSelectionStageString(lastClientStage), getClientSelectionStageString(stage)); -- cgit v1.2.3