Georg Baum wrote:
Am Mittwoch, 3. Januar 2007 12:09 schrieb Abdelrazak Younes:
Well, what you say is not fully correct, this isInternal() method could be used in LFUN_MOUSE_PRESS in place of the local paste_internally variable.

Yes, it could be used, but why should we ask the frontend for something we store anyway in the cursor?

Because if we move the X selection fill-in to selection time, then we won't know at paste time if it was internal or external. But if you look at my GuiSelection patch this could be handled internally in GuiSelection::get(). In this case, I agree that the isInternal() method does not needed to be public.


Besides, this code is wrong because the Selection clipboard should be filled in at selection time, not at mouse-press time.

You are right, the X selection should be filled at selection time (please don't call it selection clipboard, that could be misunderstood). I don't see any single call of theSelection().put(). That was AFAIK not the case when I touched this code the last time. Why have these calls been nuked?

Not me (I hope).

Nevertheless I am able to select something in LyX and paste it with middle mouse button into another app. I don't understand why this works.

Maybe because X do store the contents?

What happens on mouse press is that the selection is put into the internal clipboard. I don't know whether that is a hack (misusing the clipboard for pasting temporarily) or a feature (because the pasted stuff can then be pasted again), but it has nothing to do with Selection::isInternal.

It is a hack clearly because we don't really use the X11 selection. This should be solved because, right now, the X Selection can use the internal clipboard.

I was planning to solve that after my other patch is in but now is as good a time to discuss this. So, do you agree with me?

I don't have an opinion on the additional call of LFUN_COPY on mouse press, but I still think that Selection::isInternal is not needed.

See above. I hope we have a common understanding now.


I have to think a bit more about that but at first glance this looks like workable. Do you want to implement that? I can do it if you want.

Since I can't test the result it is better if somebody else does this.

I've done that, please test on X11.

Abdel.

Reply via email to