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 13:42:11 -0700

Thank you, Alan, for reviewing this particular thread.

1.  update_window:  Call to ns_clip_to_rect is FALSE.

2.  expose_window:  Call to ns_clip_to_rect is TRUE.

3.  expose_window:  Call to ns_clip_to_rect is TRUE.

I believe step three (3) is where the fake cursor (box/hollow family) is drawn, 
and where "row->clip = fr" in expose_window prevents the glyph from being drawn 
on top of the newly laid fake cursor.  If everything in the core of Emacs is 
working as it should, then I probably need to come up with a new test to 
determine whether a glyph can/should be drawn in this situation.  However, I 
have not yet figured out what kind of a test is needed here.

LEGEND:

"fr->x/y/width/height":  This is the incoming XRectangle value of expose_window.

"r.x/y/width/height":  This is the incoming XRectangle value of expose_line.

"fx/fy/wd/h":  These are the NSRect dimensions of the fake box/hollow family 
cursor, which appears on the first line of the bottom window in a split frame 
with equal size top/bottom windows).

STDERR MESSAGES:

redisplay_internal 0

0x11602fd60 (*MC-TEST*): same window start
0x11602fd60 (*MC-TEST*): 1

update_window (#<window 6 on *MC-TEST*>)

mc_draw_row (#<window 6 on *MC-TEST*>):  vpos (0) | hpos (0) | len (16)

mc_ns_draw_window_cursor (#<window 6 on *MC-TEST*>):  ns_clip_to_rect (FALSE)
  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)

expose_frame (2, 274, 591, 272)

expose_window (2, 274, 591, 272)

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

[expose_line]

expose_area (0):  start_x (0) | start_hpos (0) | end_hpos (16)

mc_ns_draw_window_cursor (#<window 6 on *MC-TEST*>):  ns_clip_to_rect (TRUE)
  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)

expose_frame (0, 258, 595, 16)

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]

expose_area (0):  start_x (0) | start_hpos (0) | end_hpos (16)

mc_ns_draw_window_cursor (#<window 6 on *MC-TEST*>):  ns_clip_to_rect (TRUE)
  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 12:34:21] <2 Apr 2019 20:34:21 +0100>
> From: Alan Third <address@hidden>
> To: Keith David Bershatsky <address@hidden>
> Cc: Emacs Devel <address@hidden>
> Subject: Re: Drawing dirty rectangles with expose_window:  row->clip = fr
> 
> On Mon, Apr 01, 2019 at 06:55:46PM -0700, Keith David Bershatsky wrote:
> >
> > How can I reconcile a false_positive with ns_clip_to_rect?
> 
> Has ns_clip_to_rect already been called on the same rectangle with a
> false result? That false result tells Cocoa to include that area in
> the available clipping area in drawRect:.
> 
> --
> Alan Third



reply via email to

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