emacs-devel
[Top][All Lists]
Advanced

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

Re: problem of released-button style mode-line


From: Kenichi Handa
Subject: Re: problem of released-button style mode-line
Date: Tue, 31 Oct 2000 12:06:59 +0900 (JST)

Gerd Moellmann <address@hidden> writes:
>>    (pos-visible-in-window-p POS nil t)
>>  returns t even if the upper part of line at POS is
>>  non-visible.

> Oops, an oversight.  I'll fix that.

Gerd Moellmann <address@hidden> writes:
>>  If pos-visible-in-window-p should work for a window which
>>  doesn't have the current buffer, I agree with this change.
>>  But, currently not.

> Correct.  I'll fix it.

I've confirmed that these are fixed.   But, pos_visible_p in
xdisp.c still has these problems.

(1) If CHARPOS is at bol, and a character at CHARPOS is
displayed with a very large font (e.g. 40 dots font (2.5
times taller than cannonical line height in my case)),
pos_visible_p set FULLY to 1 even if the character is
partially hidden.  I think this can be fixed by this change.

*** xdisp.c.~1.512.~    Tue Oct 31 09:48:42 2000
--- xdisp.c     Tue Oct 31 10:33:46 2000
***************
*** 962,967 ****
--- 962,968 ----
        int line_top_y = it.current_y;
        int window_top_y = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w);
        
+       move_it_in_display_line_to (&it, -1, -1, 0);
        line_height = it.max_ascent + it.max_descent;
        if (line_height == 0)
        {

(2) Once such a tall character as above is shown in the
mode-line then toggled off (.e.g. toggle chinese-py input
method on and off while setting large font for Chinese
characters), pos_visible_p doesn't return a correct value.
I think the problem is as below:

init_iterator sets IT->last_visible_y as below:
  it->last_visible_y = window_text_bottom_y (w);
But, when it is called in this calling sequence:
        pos_visible_p -> start_display -> init_iterator
CURRENT_MODE_LINE_HEIGHT returns a value that was correct
when the large character was shown.

CURRENT_MODE_LINE_HEIGHT is defined as below:

#define CURRENT_MODE_LINE_HEIGHT(W)                     \
     (MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)     \
      ? MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)   \
      : estimate_mode_line_height (XFRAME ((W)->frame), MODE_LINE_FACE_ID))

and in the above calling sequence,
        MATRIX_MODE_LINE_HEIGHT ((W)->current_matrix)
is called, and at that time, `height' member of this matrix
is 44 (40 for the tall character height and 4 for
released-button box).

I don't know how to fix it.

---
Ken'ichi HANDA
address@hidden



reply via email to

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