diff options
author | David Robillard <d@drobilla.net> | 2021-05-06 17:14:51 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-06 17:14:51 -0400 |
commit | af3dea4bb671e97eeb5fd2208f691f5e746a3b69 (patch) | |
tree | df5d62def6d7294da583f5c2d2157c221aa24337 /src | |
parent | edbbef90e1d49d48b10fa2de01c03eed8b37dcad (diff) | |
download | pugl-af3dea4bb671e97eeb5fd2208f691f5e746a3b69.tar.gz pugl-af3dea4bb671e97eeb5fd2208f691f5e746a3b69.tar.bz2 pugl-af3dea4bb671e97eeb5fd2208f691f5e746a3b69.zip |
Add test for copy/paste
Diffstat (limited to 'src')
-rw-r--r-- | src/x11.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |