[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/ns/refactor 46103cc 8/9: Fix some macOS problems
From: |
Alan Third |
Subject: |
scratch/ns/refactor 46103cc 8/9: Fix some macOS problems |
Date: |
Fri, 25 Jun 2021 13:16:57 -0400 (EDT) |
branch: scratch/ns/refactor
commit 46103cc3b582257dc470fd1f2302e9296a6e4a84
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
Fix some macOS problems
* src/nsmenu.m (update_frame_tool_bar): Make sure the toolbar isn't
displayed when it's not supposed to be.
* src/nsterm.m ([EmacsView layoutSublayersOfLayer:]): Reinstate code
intended to prevent a crash when running redisplay.
---
src/nsmenu.m | 4 ++--
src/nsterm.m | 17 ++++++-----------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 673c042..bb0dd26 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1089,10 +1089,10 @@ update_frame_tool_bar (struct frame *f)
#undef TOOLPROP
}
- if (![toolbar isVisible])
+ if ([toolbar isVisible] != FRAME_EXTERNAL_TOOL_BAR (f))
{
f->output_data.ns->in_animation = 1;
- [toolbar setVisible: YES];
+ [toolbar setVisible: FRAME_EXTERNAL_TOOL_BAR (f)];
f->output_data.ns->in_animation = 0;
}
diff --git a/src/nsterm.m b/src/nsterm.m
index b5bfb24..1c1897d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8050,20 +8050,15 @@ not_in_argv (NSString *arg)
crashes. I think it's because this code will always be run
within the run loop and for whatever reason processing input
is dangerous. This technique was stolen wholesale from
- nsmenu.m and seems to work.
-
- FIXME: I can't provoke a crash using layoutSublayersOfLayer,
- however I can't understand why it would be different from
- viewWillDraw. I'll leave this commented out for now, but if
- nobody reports a crash it can be removed. */
- // bool owfi = waiting_for_input;
- // waiting_for_input = 0;
- // block_input ();
+ nsmenu.m and seems to work. */
+ bool owfi = waiting_for_input;
+ waiting_for_input = 0;
+ block_input ();
redisplay ();
- // unblock_input ();
- // waiting_for_input = owfi;
+ unblock_input ();
+ waiting_for_input = owfi;
}
}
#endif
- branch scratch/ns/refactor created (now 049249e), Alan Third, 2021/06/25
- scratch/ns/refactor 1b88944 2/9: Tidy up NS port OS window handling, Alan Third, 2021/06/25
- scratch/ns/refactor fb5b405 1/9: Simplify macOS drawing code, Alan Third, 2021/06/25
- scratch/ns/refactor 5b2157f 4/9: Fix macOS live resize drawing, Alan Third, 2021/06/25
- scratch/ns/refactor ee6db19 5/9: Move NS port toolbar handling to the window, Alan Third, 2021/06/25
- scratch/ns/refactor 46103cc 8/9: Fix some macOS problems,
Alan Third <=
- scratch/ns/refactor 249fab9 7/9: Fix thread memory management under NS, Alan Third, 2021/06/25
- scratch/ns/refactor b402c6b 6/9: Move parent frame setting code into EmacsWindow, Alan Third, 2021/06/25
- scratch/ns/refactor 463ffa8 3/9: Change NS port resize detection, Alan Third, 2021/06/25
- scratch/ns/refactor 049249e 9/9: Fix NS native compilation builds, Alan Third, 2021/06/25