Andre Poenitz wrote:

> On Mon, Nov 10, 2003 at 03:12:02PM +0100, Alfredo Braunstein wrote:
>> Andre Poenitz wrote:
>> 
>> > I don't really know. I am still a bit confused about coordinates...
>> 
>> Hum... it would be time to take a decision then? ;-) Are inset
>> coordinates relative to the parent or absolute?
> 
> I don't even have a gut feeling here...
> 
> Another option would be to have absolute _screen_ coordinates for insets.

Uhmm... indeed I think that this is what's in the code (so my patch is
wrong). But there's something rotten about coordinates. For instance, in
any hit in LyXTexT::checkInsetHit, y is incremented by top_y... so clearly
checkInsetHit cannot be called in a loop like it is.

>> IIUC, it's worse than that, for instance fitCursor, and your recently
>> introduced getVisiblePars use the top old cursor (bv_->text->cursor),
>> that can be completely out-of-sync with where the action is happening, am
>> I right?
> 
> Yes.
> 
> But it's just for redrawing, nothing else. And we always redraw the
> whole screen.
> 
> It's not bad if we miss an action because the cursor is too far off: It
> won't be visible anyway.

No, I mean that the cursor recenters around completely wrong coordinates
sometimes. (i.e., for instance click in the main text, scroll with the
scrollbar, click somewhere inside an inset, and then everything is wrong)
I think that the old code used to put the top cursor behind the top locked
inset or something.

Alfredo


Reply via email to