GNU bug report logs - #51411
NS port cleanups

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 26 Oct 2021 11:43:01 UTC

Severity: normal

Tags: patch

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 51411 <at> debbugs.gnu.org
Subject: bug#51411: NS port cleanups
Date: Sun, 31 Oct 2021 18:34:15 +0800
Alan Third <alan <at> idiocy.org> writes:

> I think what you'll need to do is union the two rectangles and then
> clip to that, rather than clipping them both separately. That will
> then provide the same clipping as the NSClipRect code does.

I meant to say that DPSrectclip intersects (IOW, behaves just as
NSClipRect does).  Unless that's incorrect, I think what I'm doing right
now should work fine.

> I must be failing to communicate well, we keep seeming to
> misunderstand each other.

It could be my problem as well: my reading comprehension is nowhere near
as good as I would rather it be.  Thanks a lot for tolerating it.

> You still need to focus, however you don't have to clip when you
> focus.

After I unfocus here:

  /* Draw box if not done already.  */
  if (!s->for_overlaps && !box_drawn_p && s->face->box != FACE_NO_BOX)
    ns_dumpglyphs_box_or_relief (s);

-> ns_unfocus (s->f);

I make sure to focus again if an overhang might be drawn again (inside
if (s->prev) and if (s->next)), like so:

  /* Draw surrounding overhangs. */
  if (s->prev)
    {
->    ns_focus (s->f, NULL, 0);
      struct glyph_string *prev;

There is, of course, a matching unfocus.  Is that not adequate, and if
so, could you please explain how?

Thanks for the feedback, I really appreciate it.




This bug report was last modified 3 years and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.