[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 51c7996: Fix resizing glitches in NS port (bug#50413)
From: |
Alan Third |
Subject: |
master 51c7996: Fix resizing glitches in NS port (bug#50413) |
Date: |
Mon, 27 Sep 2021 08:39:02 -0400 (EDT) |
branch: master
commit 51c79967c3af3f912074a0112cbe7e00cf5073f9
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
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.
---
src/nsterm.m | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 1970a7a..a6c2e75 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6974,13 +6974,18 @@ not_in_argv (NSString *arg)
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 51c7996: Fix resizing glitches in NS port (bug#50413),
Alan Third <=