On Wed, 2 Mar 2016 09:28:16 -0600
"Edward K. Ream" <[email protected]> wrote:

> On Wed, Feb 24, 2016 at 2:05 PM, 'Terry Brown' via leo-editor <
> [email protected]> wrote:
> 
> > ​...​
> > the lack of X11's select to copy, middle button to paste has been
> > driving me nuts
> > ​...​
> >
> > https://github.com/leo-editor/snippets/blob/master/utils/x11_copy_paste_for_windows.py
> >
> > monkey patches Leo (run it from a @script node) to provide that
> > behavior, at least in the body pane where it's most useful,
> > although headline to body pane too would be nice.
> >
> > Don't think it really deserves to be in core, the code seems to
> > work fine but tramples things a bit, and it's only useful for
> > people used to X11 forced to use Windows.
> 
> ​I'll look into this for 5.1.1.  I'll add it Leo's core unless there
> is a reason not to do so.

Well, I'm not sure how much benefit there is bringing X11 mouse
select / copy paste behavior to Windows for people that aren't used to
it - not sure what Mac does, no middle button, anyway, I assume.

Also, the code hard crashes QGis, an unrelated program that also uses
Qt :-}  So if QGis and Leo are running, all is well until I single
click in Leo while there's a selection active causing the selection to
be cleared - i.e. I'm just repositioning the cursor with the mouse, and
the selection area is reset in the process.  When that happens, QGis
exits.  My guess is that the code causes some sort of selection /
clipboard state transition that is uncommon, and probably only
detectable by other Qt programs, and there's something in QGis built on
the assumption that "this can't happen in Windows".

For people used to Window's behavior, it would probably seem broken to
have selecting a piece of text replace the clipboard content.  That's
not even really what X11 does, in X11 the selection and clipboard
content are two distinct things that can be accessed independently, in
Windows it seems less straight forward to access the selection.

Also, there are clipboard helper utils. that may cover the same ground
in Windows, I was aiming for something that works on a machine for
which you don't have install access.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to