From: Alan Third <alan@idiocy.org>
To: "Charles A. Roelli" <charles@aurox.ch>
Cc: 30800@debbugs.gnu.org, aaronjensen@gmail.com
Subject: bug#30800: 26.0.91; unknown crash on macos
Date: Sat, 24 Mar 2018 14:12:29 +0000 [thread overview]
Message-ID: <20180324141229.GA42512@breton.holly.idiocy.org> (raw)
In-Reply-To: <m2o9jdhho8.fsf@aurox.ch>
[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]
On Sat, Mar 24, 2018 at 11:49:43AM +0100, Charles A. Roelli wrote:
> > Date: Fri, 23 Mar 2018 19:52:10 +0000
> > From: Alan Third <alan@idiocy.org>
> >
> > I would like to revert it if only simplify the code, but I don’t feel
> > that strongly. It may have been fixed in later releases of 10.10. It
> > would be nice if someone using 10.10 could check, but I don’t know who
> > could do that.
>
> What would you like to check? I have a partition with 10.10.
Hi Charles, thanks for offering to check this.
I’ve attached a patch for the emacs-26 branch that reverts
d9d383147219f8e6a90d4c177e1b454e19acfac9. It doesn’t revert cleanly,
hence the patch. You could try reverting it on master if you want, but
I suspect it will be harder to do.
Once that’s applied try the reproduction steps in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18757#41
Basically the code in question has at least one reproducible bug and
looks as though it should have several more that we haven’t seen yet,
and although we have a work‐around we’re wondering if we can just get
rid of it completely as it appears to have been a work‐around for a
bug introduced in macOS 10.10 and fixed some time later, hopefully
before 10.10 stopped getting fixes.
--
Alan Third
[-- Attachment #2: 0001-Revert-More-flicker-fixes-for-OSX-related-to-bug-187.patch --]
[-- Type: text/plain, Size: 4303 bytes --]
From 0e7da51a70ab7ea0dace246919a575890a061908 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Sat, 24 Mar 2018 13:50:17 +0000
Subject: [PATCH] Revert "More flicker fixes for OSX, related to bug 18757."
This reverts commit d9d383147219f8e6a90d4c177e1b454e19acfac9.
---
src/ChangeLog.13 | 2 +-
src/nsfns.m | 9 ++++++++-
src/nsterm.h | 6 +++---
src/nsterm.m | 29 +----------------------------
4 files changed, 13 insertions(+), 33 deletions(-)
diff --git a/src/ChangeLog.13 b/src/ChangeLog.13
index 31e01306a0..eddf85a367 100644
--- a/src/ChangeLog.13
+++ b/src/ChangeLog.13
@@ -13,7 +13,7 @@
outside of this function (Bug#16737).
(set_property_change_object): New function.
-2015-04-03 Jan Djärv <jan.h.d@swipnet.se>
+2014-11-27 Eli Zaretskii <eliz@gnu.org>
* xterm.c (handle_one_xevent): Always redraw tool tips on
MapNotify. Update tool tip frame sizes on ConfigureNotify.
diff --git a/src/nsfns.m b/src/nsfns.m
index 7f2f060dda..83b5fc9541 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -578,11 +578,18 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side
fstr = [NSString stringWithUTF8String: SSDATA (encoded_filename)];
if (fstr == nil) fstr = @"";
+#ifdef NS_IMPL_COCOA
+ /* work around a bug observed on 10.3 and later where
+ setTitleWithRepresentedFilename does not clear out previous state
+ if given filename does not exist */
+ if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr])
+ [[view window] setRepresentedFilename: @""];
+#endif
}
else
fstr = @"";
- ns_set_represented_filename (fstr, f);
+ [[view window] setRepresentedFilename: fstr];
[[view window] setTitle: str];
fset_name (f, name);
}
diff --git a/src/nsterm.h b/src/nsterm.h
index 588b9fc644..2308e0a994 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1230,11 +1230,11 @@ struct input_event;
extern void ns_init_events (struct input_event *);
extern void ns_finish_events (void);
+/* From nsterm.m, needed in nsfont.m. */
#ifdef __OBJC__
-/* Needed in nsfns.m. */
extern void
-ns_set_represented_filename (NSString *fstr, struct frame *f);
-
+ns_draw_text_decoration (struct glyph_string *s, struct face *face,
+ NSColor *defaultCol, CGFloat width, CGFloat x);
#endif
#ifdef NS_IMPL_GNUSTEP
diff --git a/src/nsterm.m b/src/nsterm.m
index 3d58cd5ec6..2530a86ab6 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -322,9 +322,6 @@ - (NSColor *)colorUsingDefaultColorSpace
NULL, 0, 0
};
-static NSString *represented_filename = nil;
-static struct frame *represented_frame = 0;
-
#ifdef NS_IMPL_COCOA
/*
* State for pending menu activation:
@@ -442,13 +439,6 @@ - (NSColor *)colorUsingDefaultColorSpace
========================================================================== */
-void
-ns_set_represented_filename (NSString *fstr, struct frame *f)
-{
- represented_filename = [fstr retain];
- represented_frame = f;
-}
-
void
ns_init_events (struct input_event *ev)
{
@@ -3323,7 +3313,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
-static void
+void
ns_draw_text_decoration (struct glyph_string *s, struct face *face,
NSColor *defaultCol, CGFloat width, CGFloat x)
/* --------------------------------------------------------------------------
@@ -5443,23 +5433,6 @@ - (void)sendEvent: (NSEvent *)theEvent
}
#endif
- if (represented_filename != nil && represented_frame)
- {
- NSString *fstr = represented_filename;
- NSView *view = FRAME_NS_VIEW (represented_frame);
-#ifdef NS_IMPL_COCOA
- /* work around a bug observed on 10.3 and later where
- setTitleWithRepresentedFilename does not clear out previous state
- if given filename does not exist */
- if (! [[NSFileManager defaultManager] fileExistsAtPath: fstr])
- [[view window] setRepresentedFilename: @""];
-#endif
- [[view window] setRepresentedFilename: fstr];
- [represented_filename release];
- represented_filename = nil;
- represented_frame = NULL;
- }
-
if (type == NSEventTypeApplicationDefined)
{
switch ([theEvent data2])
--
2.16.1
next prev parent reply other threads:[~2018-03-24 14:12 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 16:18 bug#30800: 26.0.91; unknown crash on macos Aaron Jensen
2018-03-13 16:36 ` Aaron Jensen
2018-03-20 23:39 ` Aaron Jensen
2018-03-21 6:37 ` Eli Zaretskii
2018-03-21 16:25 ` Aaron Jensen
2018-03-21 17:00 ` Eli Zaretskii
2018-03-21 17:09 ` Eli Zaretskii
2018-03-21 17:31 ` Aaron Jensen
2018-03-21 18:22 ` Eli Zaretskii
2018-03-21 18:31 ` Aaron Jensen
2018-03-21 18:48 ` Eli Zaretskii
2018-03-21 19:19 ` Alan Third
2018-03-21 19:36 ` Eli Zaretskii
2018-03-21 20:12 ` Alan Third
2018-03-22 5:40 ` Aaron Jensen
2018-03-22 7:26 ` Eli Zaretskii
2018-03-22 15:39 ` Aaron Jensen
2018-03-22 15:57 ` Eli Zaretskii
2018-03-23 1:49 ` Aaron Jensen
2018-03-23 8:16 ` Eli Zaretskii
2018-03-23 19:52 ` Alan Third
2018-03-23 20:57 ` Aaron Jensen
2018-03-23 21:47 ` macOS support (was: bug#30800: 26.0.91; unknown crash on macos) Alan Third
2018-03-24 6:35 ` Eli Zaretskii
2018-03-24 7:18 ` Aaron Jensen
2018-03-24 10:27 ` Alan Third
2018-03-24 14:52 ` Eli Zaretskii
2018-03-25 20:08 ` David Reitter
2018-03-25 21:24 ` Tim Cross
2018-03-25 22:31 ` macOS support Stefan Monnier
2018-03-26 1:34 ` Paul Eggert
2018-03-26 2:14 ` Stefan Monnier
2018-03-26 5:41 ` Tim Cross
2018-03-26 5:49 ` Jean-Christophe Helary
2018-03-26 23:07 ` Richard Stallman
2018-03-24 7:20 ` bug#30800: 26.0.91; unknown crash on macos Aaron Jensen
2018-03-24 10:29 ` Alan Third
2018-03-24 14:54 ` Eli Zaretskii
2018-03-24 16:18 ` Alan Third
2018-03-24 17:48 ` Eli Zaretskii
2018-03-25 19:17 ` Alan Third
2018-03-24 10:49 ` Charles A. Roelli
2018-03-24 14:12 ` Alan Third [this message]
2018-03-25 20:14 ` Charles A. Roelli
2018-03-26 18:37 ` Alan Third
2018-03-26 23:03 ` Aaron Jensen
2018-03-30 11:37 ` Alan Third
2018-03-30 11:57 ` Aaron Jensen
2018-03-22 5:35 ` Aaron Jensen
2018-03-22 7:16 ` Eli Zaretskii
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=20180324141229.GA42512@breton.holly.idiocy.org \
--to=alan@idiocy.org \
--cc=30800@debbugs.gnu.org \
--cc=aaronjensen@gmail.com \
--cc=charles@aurox.ch \
/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.