No, this was not about naming. What I meant was: LyX does not care whether
the selection was set from within or not. It simply sends the selection to
the X server when it has one, and gets the current selection back when it
is requested. Therefore a Selection::isInternal() method is only
confusing, because it is not needed. Besides that the comment is wrong.

This is feasible under X11, but I guess qt/win does not have system
selection buffer, right? That is to say, keeping internal selection is
the only way to do middle-button paste under windows.

lyx::frontend::GuiSelection is BTW exactly the place where a real selection
with middle mouse paste could be emulated on windows: Just store the
string in put(), return it back in get() and clear it in haveSelection()
if needed.

Yes. This is what I meant. :-)

Then the only thing that would be missing for Enrico is a
connection of this emulated selection to the external clipboard,

What Enrico wants should, IMHO, not be supported. I insist on a clear
selection/clipboard separation.

 but you
could even do that without destroying the simple mental model of
selection: In lyx::frontend::GuiSelection::get(), return the system
clipboard if it was set from outside of LyX and the LyX internal selection
is empty.

Objection here. See above, and another thread.

This could even be implemented without any #ifdef by simply using
qApp->clipboard()->supportsSelection(), and would work automatically on
all platforms that don't have a selection. This way, no preference setting
would be needed, and the behaviour on windows and X11 would be as
identical as possible. Or did I miss anything?

Do you want C-v to paste selection? This is not the same under X11. I
mean, under windows, middle-button paste would better work, but only
paste selection, and these operations should have nothing to do with
windows clipboard.

Cheers,
Bo

Reply via email to