aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/x11.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/x11.c b/src/x11.c
index 3c3059a..3ead696 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -1,5 +1,5 @@
/*
- Copyright 2012-2020 David Robillard <d@drobilla.net>
+ Copyright 2012-2021 David Robillard <d@drobilla.net>
Copyright 2013 Robin Gareus <robin@gareus.org>
Copyright 2011-2012 Ben Loftis, Harrison Consoles
@@ -1357,12 +1357,11 @@ puglSetClipboard(PuglView* const view,
const PuglX11Atoms* const atoms = &view->world->impl->atoms;
PuglStatus st = puglSetInternalClipboard(view, type, data, len);
- if (st) {
- return st;
+ if (!st) {
+ XSetSelectionOwner(impl->display, atoms->CLIPBOARD, impl->win, CurrentTime);
}
- XSetSelectionOwner(impl->display, atoms->CLIPBOARD, impl->win, CurrentTime);
- return PUGL_SUCCESS;
+ return st;
}
#ifdef HAVE_XCURSOR