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? > 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? 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. 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. > 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. > 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. Georg