aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2013-03-16 15:15:42 +0100
committerJan Djärv2013-03-16 15:15:42 +0100
commit960ce48010f19dcaef060fc2f869968ac7fa757d (patch)
tree7b7c301585d583c39db41070c168582c8a987a8a
parent8f2906f551da4a06c0097887e8ad61b8144baeac (diff)
downloademacs-960ce48010f19dcaef060fc2f869968ac7fa757d.tar.gz
emacs-960ce48010f19dcaef060fc2f869968ac7fa757d.zip
* nsterm.m (updateFrameSize:): Change resize increments if needed.
-rw-r--r--src/ChangeLog2
-rw-r--r--src/nsterm.m14
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d924772abad..06618a543e2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12013-03-16 Jan Djärv <jan.h.d@swipnet.se> 12013-03-16 Jan Djärv <jan.h.d@swipnet.se>
2 2
3 * nsterm.m (updateFrameSize:): Change resize increments if needed.
4
3 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename 5 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
4 and getDirectory. 6 and getDirectory.
5 7
diff --git a/src/nsterm.m b/src/nsterm.m
index 1f09e031592..be586010c81 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5448,12 +5448,26 @@ not_in_argv (NSString *arg)
5448 5448
5449 if (oldr != rows || oldc != cols || neww != oldw || newh != oldh) 5449 if (oldr != rows || oldc != cols || neww != oldw || newh != oldh)
5450 { 5450 {
5451 struct frame *f = emacsframe;
5451 NSView *view = FRAME_NS_VIEW (emacsframe); 5452 NSView *view = FRAME_NS_VIEW (emacsframe);
5453 NSWindow *win = [view window];
5454 NSSize sz = [win resizeIncrements];
5455
5452 FRAME_PIXEL_WIDTH (emacsframe) = neww; 5456 FRAME_PIXEL_WIDTH (emacsframe) = neww;
5453 FRAME_PIXEL_HEIGHT (emacsframe) = newh; 5457 FRAME_PIXEL_HEIGHT (emacsframe) = newh;
5454 change_frame_size (emacsframe, rows, cols, 0, delay, 0); 5458 change_frame_size (emacsframe, rows, cols, 0, delay, 0);
5455 SET_FRAME_GARBAGED (emacsframe); 5459 SET_FRAME_GARBAGED (emacsframe);
5456 cancel_mouse_face (emacsframe); 5460 cancel_mouse_face (emacsframe);
5461
5462 // Did resize increments change because of a font change?
5463 if (sz.width != FRAME_COLUMN_WIDTH (emacsframe) ||
5464 sz.height != FRAME_LINE_HEIGHT (emacsframe))
5465 {
5466 sz.width = FRAME_COLUMN_WIDTH (emacsframe);
5467 sz.height = FRAME_LINE_HEIGHT (emacsframe);
5468 [win setResizeIncrements: sz];
5469 }
5470
5457 [view setFrame: NSMakeRect (0, 0, neww, newh)]; 5471 [view setFrame: NSMakeRect (0, 0, neww, newh)];
5458 [self windowDidMove:nil]; // Update top/left. 5472 [self windowDidMove:nil]; // Update top/left.
5459 } 5473 }