emacs-devel
[Top][All Lists]
Advanced

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

Re: Drawing dirty rectangles with expose_window: row->clip = fr


From: Keith David Bershatsky
Subject: Re: Drawing dirty rectangles with expose_window: row->clip = fr
Date: Tue, 02 Apr 2019 10:42:17 -0700

Sorry, I misspoke ... I had erroneously placed a condition that inhibited an 
important message that we need here.  It is actually the first call to 
expose_line within expose_window where we see the issue occur, and that is why 
commenting out "row->clip = fr" makes the issue go away.

The FRAME_BOX_CURSOR is a variant of box/hollow cursors.  The box/hollow cursor 
family is drawn with NSRectFill, and then draw_glyphs writes a glyph on top of 
the fake cursor if there is a character there.

EXAMPLE:  On the first line of the bottom window (split frame with even 
top/bottom windows), we have a sentence:  "This is a test!"  We draw a 
box/hollow family cursor at HPOS 6, which lands on top of the letter "s".  One 
or more colored rectangles is/are drawn on top of the letter "s", effectively 
erasing the letter "s" completely.  draw_glyphs then writes a _new_ letter "s" 
on top of the colored rectangles.

In the current issue, the colored rectangles are drawn on top of the letter "s" 
at HPOS 6.  However, the call to draw_glyphs does not result in a _new_ letter 
"s" being drawn on top of the colored rectangles.  "row->clip = fr" prevents 
the _new_ letter "s" from being drawn on the glass.

The expose_window XRectangle dimensions are as follows:

    fr->x (0) | fr->y (258) | fr->width (595) | fr->height (16)

The expose_line XRectangle dimensions are as follows:

    r.x (0) | r.y (0) | r.width (591) | r.height (0)

The box/hollow family cursor NSRect dimensions are as follows:

    fx (52) | fy (274) | w (7) | h (16)

The relevant STDERR printout is as follows:

expose_window (2, 274, 591, 0)

A.  expose_window (#<window 6 on *MC-TEST*>):  vpos (0)
    fr->x (0) | fr->y (258) | fr->width (595) | fr->height (16)
    r.x (0) | r.y (0) | r.width (591) | r.height (0)

[expose_line is called]

[expose_area is called]

mc_ns_draw_window_cursor (#<window 6 on *MC-TEST*>):
  x (42) | fx (52) | y (0) | fy (274) | hpos (6) | vpos (0)
  wd (7) | h (16) | RGB (1.000000/0.000000/0.270588)
  cursor_type (FRAMED_BOX_CURSOR) | glyph_flavor (MC_GLYPH)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

> Date: [04-02-2019 09:51:49] <02 Apr 2019 19:51:49 +0300>
> From: Eli Zaretskii <address@hidden>
> To: Keith David Bershatsky <address@hidden>
> CC: address@hidden
> Subject: Re: Drawing dirty rectangles with expose_window:  row->clip = fr
> 
> > Date:  Tue, 02 Apr 2019 09:27:44 -0700
> > From:  Keith David Bershatsky <address@hidden>
> > Cc:  address@hidden
> >
> > In this example, there is one frame with two windows in a top/bottom equal 
> > split.  The top window (*scratch*) does not have any fake cursors.  The 
> > bottom window (*MC-TEST*) does have fake cursors.  It appears that 
> > expose_window is drawing the mode-line of the top window, and the rectangle 
> > extends down into the first line of the bottom window that has fake 
> > cursors.  The fake cursors draw on the first line of the bottom window, but 
> > the glyphs do not draw on top of the box/hollow cursors.  This happens at 
> > the section of expose_window where it has the comment:
> >
> > /* Display the mode line if there is one.  */
> 
> I don't think I understand you answer.
> 
> What is the height of the mode line? is it 16 pixels or less?  IOW,
> how do you conclude that the rectangle 'fr' extends beyond the mode
> line?
> 
> I also don't understand the meaning of this part:
> 
>   The fake cursors draw on the first line of the bottom window, but
>   the glyphs do not draw on top of the box/hollow cursors.
> 
> Which glyphs "do not draw on top of the box/hollow cursors"?



reply via email to

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