all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Alan Third <athird@googlemail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Drawing dirty rectangles with expose_window:  row->clip = fr
Date: Wed, 03 Apr 2019 12:28:57 -0700	[thread overview]
Message-ID: <m2wokac2h2.wl%esq@lawlist.com> (raw)

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	other threads:[~2019-04-03 19:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 19:28 Keith David Bershatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-04-02 20:42 Drawing dirty rectangles with expose_window: row->clip = fr Keith David Bershatsky
2019-04-02 17:42 Keith David Bershatsky
2019-04-02 16:27 Keith David Bershatsky
2019-04-02 16:51 ` Eli Zaretskii
2019-04-02  1:55 Keith David Bershatsky
2019-04-02 14:48 ` Eli Zaretskii
2019-04-02 19:34 ` Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wokac2h2.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=athird@googlemail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.