unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Third <alan@idiocy.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: emacs-devel@gnu.org
Subject: Re: nsterm.m: How to prevent _inactive_ window update from overreaching.
Date: Wed, 28 Nov 2018 21:31:09 +0000	[thread overview]
Message-ID: <20181128213109.GB51965@breton.holly.idiocy.org> (raw)
In-Reply-To: <m2o9abru98.wl%esq@lawlist.com>

On Mon, Nov 26, 2018 at 08:58:59PM -0800, Keith David Bershatsky wrote:
> 
> The present design calculates and draws/erases fake cursors based
> upon particular visible windows that get updated during redisplay,
> rather than rectangles within a particular window or set of windows.
> If I am understanding your comments correctly, it sounds like a new
> rectangle system of fake cursor calculation and drawing/erasing of
> fake cursors would need to be designed (solely for the benefit of
> MacOS Mojave users).

It’s not new and it’s not solely for Mojave. It’s the ‘expose’
functionality which comes into use when, say, one window is partially
covering another, but is then removed. The GUI toolkit fires an
‘expose event’ for the area that has just been uncovered (a
rectangle), and the application redraws that area.

You can find the code in xdisp.c beginning with the function
expose_frame.

What makes this particularly noticeable with the NS port now is that
we’re using it as the primary drawing mechanism as Mojave has removed
the previously used method.

> Or, at the very least, calculate fake cursors
> once for each visible window (where fake cursors are active) and
> then loop through cached coordinates when a rectangle is drawn to
> see if any fake cursors are contained within -- if so, then
> draw/erase fake cursors within that rectangle

‘expose_window’ appears to redraw the cursor in exposed windows, so
that may be a good place to look.

FWIW I asked about how the crosshair is drawn (since that was what you
were discussing originally) but you only talked about multiple
cursors. Am I to assume then that the crosshair drawing is tightly
integrated with the multiple cursors?
-- 
Alan Third



  reply	other threads:[~2018-11-28 21:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27  4:58 nsterm.m: How to prevent _inactive_ window update from overreaching Keith David Bershatsky
2018-11-28 21:31 ` Alan Third [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-12-12  7:07 Keith David Bershatsky
2018-11-29  5:52 Keith David Bershatsky
2018-11-26  2:14 Keith David Bershatsky
2018-11-26 20:09 ` Alan Third
2018-11-25  2:20 Keith David Bershatsky
2018-11-22 20:13 Keith David Bershatsky
2018-11-22 19:07 Keith David Bershatsky
2018-11-22 22:57 ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20181128213109.GB51965@breton.holly.idiocy.org \
    --to=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=esq@lawlist.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).