[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/ns/next 6fd71f3 4/8: Prevent frame resizes moving
From: |
Alan Third |
Subject: |
[Emacs-diffs] scratch/ns/next 6fd71f3 4/8: Prevent frame resizes moving the top left |
Date: |
Tue, 15 Jan 2019 12:12:28 -0500 (EST) |
branch: scratch/ns/next
commit 6fd71f3b99425e8be9c512fe89eb10df7b332e11
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Prevent frame resizes moving the top left
* src/nsterm.m ([EmacsView viewWillDraw]): Reset the top left when the
frame resizes.
---
src/nsterm.m | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index 9abbc52..7adc55b 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8005,14 +8005,13 @@ not_in_argv (NSString *arg)
another, resize it before drawing to it. */
if (! NSEqualSizes (curSize, newSize))
{
- /* FIXME: This resizes from the bottom of the frame instead of
- the top. I guess we have to reposition the frame's
- origin. */
- [window setContentSize:newSize];
+ NSRect frame = [window frame];
+ NSPoint topLeft = NSMakePoint (NSMinX (frame), NSMaxY (frame));
- [self windowDidMove: // Update top/left.
- [NSNotification notificationWithName:NSWindowDidMoveNotification
- object:window]];
+ /* This resizes such that the top edge of the frame moves, so we
+ need to reset the top-left origin. */
+ [window setContentSize:newSize];
+ [window setFrameTopLeftPoint:topLeft];
}
}
- [Emacs-diffs] branch scratch/ns/next created (now 91f1182), Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next 91f1182 8/8: Remove NS non-native fullscreen delay, Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next 7dcce0a 1/8: Prevent redrawing if frame is garbaged, Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next 6fd71f3 4/8: Prevent frame resizes moving the top left,
Alan Third <=
- [Emacs-diffs] scratch/ns/next 1fcde76 6/8: Fix compiler warnings, Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next 0a26d3e 2/8: Defer frame resizing, Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next e9f1394 5/8: Fix scrollbars after leaving non-native fullscreen, Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next a2e345f 3/8: Defer setting scrollbar size and position, Alan Third, 2019/01/15
- [Emacs-diffs] scratch/ns/next fe937bb 7/8: Merge branch 'master' into scratch/ns/next, Alan Third, 2019/01/15