<div dir="ltr"><div>Seems it is pretty simple to peek and wait for the event.</div><div><br></div><div>But I 'm not really sure how to handle pasting when the clipboard is blank. Especially since you can't distinguish between the OS clipboard being inaccessible, and being blank.<br></div><div><br></div><div>Also, the fact that in the multiline string editor, pasting replaces the entire existing contents is awkward. We should add selections to the text editor, so that you press Ctrl+A Ctrl+V to replace the contents.</div><div>The standard way to select text by the keyboard seems to be to hold shift and move the cursor. I prefer the emacs way: press Ctrl+Space... but that's already mapped to the character picker :(</div><div><br></div><div>Oh, in that case you could wipe text with Ctrl+A Delete instead of pasting in a blank string. So pasting a blank string is less useful.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 October 2017 at 11:27, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.</div><div><br></div><div>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.<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 19 October 2017 at 04:33, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div><div>The new clipboard stuff is cool!<br><br></div>So far I have only tested on Linux.<br><br></div>Copying textboxes and other strings, and pasting them into other documents, e-mail, word-processor seems to work great!<br><br></div>Going back the other way seems a little flakey, but I can't tell why yet.<br><br></div>Most of the time, pasting something I copied from another application into a textbox does nothing at all.<br><br></div>Sometimes it works after I try twice in a row. Once it blanked out the old text, but didn't paste any new text.<br><br></div>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.<span></span></div>
<br></div></div>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>