aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-11-12 23:22:39 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:51 +0200
commit177d761797b36fdadb246c0129cfb14bcc1c0c19 (patch)
tree39528cc6e1860eb414ce29aac4632fb9d7100baf /nx-X11/programs/Xserver
parentb66b99a8310d312c53007e124a0924f5795b1b2c (diff)
downloadnx-libs-177d761797b36fdadb246c0129cfb14bcc1c0c19.tar.gz
nx-libs-177d761797b36fdadb246c0129cfb14bcc1c0c19.tar.bz2
nx-libs-177d761797b36fdadb246c0129cfb14bcc1c0c19.zip
Clipboard.c: fix: remove wrong optimization
In the "none" case we must ensure the clipboard data is reset. This "optimization" skipped the reset part which made the code think it is waiting for an answer. Which (of course) never arrived. So any further request was rejected... Also reduce debugging output for the "none" case because resetClientSelectionStage will print it anyway.
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index f57459882..2856026f2 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -480,26 +480,16 @@ static void resetClientSelectionStage(int index)
static void setClientSelectionStage(int stage, int index)
{
- if (lastClients[index].stage == stage)
- {
- #ifdef DEBUG
- fprintf(stderr, "%s: lastClient [%d] selection stage already set to [%s] - doing nothing\n", __func__,
- index, getClientSelectionStageString(lastClients[index].stage));
- #endif
- return;
- }
-
- #ifdef DEBUG
- fprintf(stderr, "%s: Changing selection stage for [%d] from [%s] to [%s]\n", __func__, index,
- getClientSelectionStageString(lastClients[index].stage), getClientSelectionStageString(stage));
- #endif
-
if (stage == SelectionStageNone)
{
resetClientSelectionStage(index);
}
else
{
+ #ifdef DEBUG
+ fprintf(stderr, "%s: Changing selection stage for [%d] from [%s] to [%s]\n", __func__, index,
+ getClientSelectionStageString(lastClients[index].stage), getClientSelectionStageString(stage));
+ #endif
lastClients[index].stage = stage;
}
}