[Ohrrpgce] Clipboard stuff

Ralph Versteegen teeemcee at gmail.com
Wed Oct 18 15:27:35 PDT 2017


I know why working only if you do it twice in a row happens. On X11, unlike
Windows and Mac, to get the contents of the clipboard you send a request to
another application and then are meant to wait for the response (an X11
event).  To simplify the code (the original calls SDL_PumpEvents which I
dont' want to do... maybe I can peek at the X11 event buffer instead) I
just wait 4ms instead. But I realised this is way too little - for example
the other application might be running running a loop at 30fps and only so
checks for events every 33ms. I forgot to increase it.

Blanking out text when you paste would happen if the OS clipboard appears
to be empty (because of the timeout problem) and the internal clipboard
(STATIC clip) is also empty because you've never copy-pasted.


On 19 October 2017 at 04:33, James Paige <Bob at hamsterrepublic.com> wrote:

> The new clipboard stuff is cool!
>
> So far I have only tested on Linux.
>
> Copying textboxes and other strings, and pasting them into other
> documents, e-mail, word-processor seems to work great!
>
> Going back the other way seems a little flakey, but I can't tell why yet.
>
> Most of the time, pasting something I copied from another application into
> a textbox does nothing at all.
>
> Sometimes it works after I try twice in a row. Once it blanked out the old
> text, but didn't paste any new text.
>
> I haven't figured out the rhyme or reason to when it does and does not
> work yet. I did not see anything in the debug log.
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20171019/1be88b91/attachment.html>


More information about the Ohrrpgce mailing list