emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two (or much more) cursors bug debugged (simple test case)


From: Gerd Moellmann
Subject: Re: Two (or much more) cursors bug debugged (simple test case)
Date: 28 Nov 2001 20:15:59 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.30

(Not sure if my first try to send this worked.  Please ignore
duplicates.)

address@hidden (Pavel Janík) writes:

> Is the font which is generated by XFree86 buggy?

The font is okay.  X fonts can contain glyphs which draw outside of
their ``normal'' bounding box; XLFD allows this and it's used.  =C9 in
some latin-1 Courier fonts is an example where the accent can draw
into the line above it; some italic Courier fonts have glyphs that
draw over glyphs to their left (BTW, entering a char whose glyph draws
into the line above it in the first line of a window makes that line a
tall enough to show the whole accent; hm, I'm almost sure some users
will hate that ):-).  Vertical overlaps are taken into account in
update_window where it calls redraw_overlapped_rows and
redraw_overlapping_rows.  Horizontal overlaps are taken into account
partly in x_draw_glyphs, and partly in update_text_area when it
computes lbearing and rbearing.

But that only as an aside, the real problem is that for redrawing
vertical overlaps, only glyph foregrounds may be drawn, and drawing
the foreground only cannot possibly erase the complete cursor image
from the screen, so setting phys_cursor_visible_p to zero in such a
case is an error because that promises that the cursor has been
removed from the screen which it has not.

I guess that few people have seen the problem because few people use a
font with overlapping glyphs like above combined with a language where
such glyphs (normally for accented chars) are used often enough that
the problem manifests itself.

> Why 21.1 does not have this problem? I remember that I have this problem
> even in pretest era... Probably some magic involved :-)

I fixed some other problems I detected some weeks ago while pursuing
the cursor code.  There was also a report of something else not
working right with cursors (I think replacing a Kanji character with
an ASCII character or something similar), which led to code changes
which let's 21.1 behave a bit differently from RC and HEAD.

The code in RC and HEAD should be more correct, except for this
negligible oversight that is :-).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]