Georg Baum wrote:
Am Donnerstag, 4. Januar 2007 12:28 schrieb Abdelrazak Younes:
Actually we never reached a consensus to put isInternal() in in the first
place, therefore I simply removed it.
OK, Eye for eye...
Apart from that I don't think that I am missing something. The X selection
gets filled if another X application requests it (see the documentation of
Selection::put, until yesterday I did not fully understand that). We don't
care at all about the X selection except for the following cases:
- Another app requests our selection. This is handled in
GuiApplication::x11EventFilter. isInternal() is not needed.
OK.
- We want to paste the selection by middle mouse button. Then we either
paste the internal one if cur.selection() is true, or else we call
theSelection()->get(). We don't need isInternal() here, cur.selection() is
less expensive and does exactly what we need. You certaionly don't want to
treat selection by keyboard differently than selection by mouse here?
Sure I want. The X selection should be filled in only when using the mouse!
Therefore I make a clear distinction between text selected by the
keyboard and text selected by the mouse. This is the reason why we need
isInternal() here.
I want to set the X selection in those cases:
1) dragging the mouse with left button
2) left button double-click
3) left button triple-click
4) ctrl+left button click
But not when selecting with the keyboard because:
1) I want this last operation to be very fast and filling in a new cut
at each arrow key press is stupid.
2) I want to reuse the current X selection. Why should that be emptied
if I didn't touch the mouse since the last selection?
3) It is clearly wrong to emptied the X selection (that could have been
filled in by another app) with only the keyboard. The X selection should
be emptied with a mouse click only!
Hope I am clear now but all of this was very obvious to me.
- We want to paste the selection by the primary-selection-paste lfun.
isInternal() is not needed, we always use theSelection()->get().
OK.
The only yet unclear case is this strange haveSelection() method.
I think we should ditch that and put back isInternal().
Abdel.