mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-14 09:39:42 +00:00
Fix crash when resizing GNUstep builds
The toolkit can send far too many resize notifications, so be more careful when we take action after receiving one. * src/nsfns.m (ns_set_tool_bar_lines): Remove unneeded NSTRACE. * src/nsterm.m ([EmacsView viewDidResize:]): Don't report resizes to Emacs when the same change has already been reported and delayed.
This commit is contained in:
parent
d0d95d1614
commit
609d814fdf
@ -668,11 +668,7 @@ Turn the input menu (an NSMenu) into a lisp list for tracking on lisp side.
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
NSTRACE_MSG ("inhibit:%d", inhibit);
|
||||
|
||||
adjust_frame_size (f, -1, -1, 2, false, Qtool_bar_lines);
|
||||
}
|
||||
adjust_frame_size (f, -1, -1, 2, false, Qtool_bar_lines);
|
||||
}
|
||||
|
||||
static void
|
||||
|
11
src/nsterm.m
11
src/nsterm.m
@ -7308,16 +7308,19 @@ - (void)viewDidResize:(NSNotification *)notification
|
||||
oldw = FRAME_PIXEL_WIDTH (emacsframe);
|
||||
oldh = FRAME_PIXEL_HEIGHT (emacsframe);
|
||||
|
||||
NSTRACE_SIZE ("New size", NSMakeSize (neww, newh));
|
||||
NSTRACE_SIZE ("Original size", NSMakeSize (oldw, oldh));
|
||||
|
||||
/* Don't want to do anything when the view size hasn't changed. */
|
||||
if (oldh == newh && oldw == neww)
|
||||
if ((oldh == newh && oldw == neww)
|
||||
|| (emacsframe->new_size_p
|
||||
&& newh == emacsframe->new_height
|
||||
&& neww == emacsframe->new_width))
|
||||
{
|
||||
NSTRACE_MSG ("No change");
|
||||
return;
|
||||
}
|
||||
|
||||
NSTRACE_SIZE ("New size", NSMakeSize (neww, newh));
|
||||
NSTRACE_SIZE ("Original size", NSMakeSize (oldw, oldh));
|
||||
|
||||
#ifdef NS_DRAW_TO_BUFFER
|
||||
if ([self wantsUpdateLayer])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user