GNU bug report logs - #56559
29.0.50; Invalid CGContextSaveState on NS

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Thu, 14 Jul 2022 15:09:02 UTC

Severity: normal

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 56559 <at> debbugs.gnu.org
Subject: bug#56559: 29.0.50; Invalid CGContextSaveState on NS
Date: Fri, 15 Jul 2022 15:25:01 +0200
Can I please ask another question?  You seem to be the only one here knowing the NS stuff.

I'm looking at the ns_focus/ns_unfocus stuff,.  From just eading the code, it appears to me that nested calls liek so:

  1 ns_focus          in ns_draw_window_cursor
  2   ns_focus        in draw_.*
  3   ns_unfocus      in draw_.*
  4   ...
  5 ns_unfocus        in ns_draw_window_cursor

are not supported, or is the intention that they are?

My hypthesis is the ns_unfocus in line 3 above undoes the ns_focus from line 1, or parts thereof, I haven't checked that thoroughly.

To make that a theory, I've added an ns_focus like so

      ns_focus(f, NULL, 0);
      [NSBezierPath strokeRect:NSInsetRect(r, 0.5, 0.5)];

and voilà the error is gone.



This bug report was last modified 2 years and 309 days ago.

Previous Next


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