1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-27 07:37:33 +00:00

Fix resizing glitches in NS port (bug#50413)

* src/nsterm.m ([EmacsView resizeWithOldSuperviewSize:]): Use the
superview's size instead of trusting the view's size.
This commit is contained in:
Alan Third 2021-09-27 13:33:49 +01:00
parent 2c2688ffbf
commit 51c79967c3

View File

@ -6974,13 +6974,18 @@ - (void)resizeWithOldSuperviewSize: (NSSize)oldSize
if (! FRAME_LIVE_P (emacsframe))
return;
frame = [self frame];
frame = [[self superview] bounds];
width = (int)NSWidth (frame);
height = (int)NSHeight (frame);
NSTRACE_SIZE ("New size", NSMakeSize (width, height));
NSTRACE_SIZE ("Original size", size);
/* Reset the frame size to match the bounds of the superview (the
NSWindow's contentView). We need to do this as sometimes the
view's frame isn't resized correctly, or can end up with the
wrong origin. */
[self setFrame:frame];
change_frame_size (emacsframe, width, height, false, YES, false);
SET_FRAME_GARBAGED (emacsframe);