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: Wed, 03 Apr 2019 12:28:57 -0700

After some additional testing and digging into the core code of Emacs, I made 
the following observations:

. ns_draw_window_cursor calls ns_clip_to_rect, which does _not_ take 
"row->clip" into consideration when drawing cursors with NSRectFill.

. When it comes time to draw glyphs on top of the box/hollow family of cursors, 
"row->clip" is taken into consideration by get_glyph_string_clip:

  if (s->row->clip)
    {
      XRectangle r_save = r;
      if (! x_intersect_rectangles (&r_save, s->row->clip, &r))
        r.width = 0;
    }

Inasmuch as fake cursors are drawn immediately following calls to draw_glyphs 
(e.g., during expose_window), I have created a slightly modified version of 
ns_clip_to_rect that takes "row->clip" into consideration and calls an NS 
version of x_intersect_rectangles ...  In a few tests, this approach appears to 
be achieving the desired results.

Keith



reply via email to

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