* nsterm.m (updateFrameSize:): Change resize increments if needed.

This commit is contained in:
Jan Djärv 2013-03-16 15:15:42 +01:00
parent 8f2906f551
commit 960ce48010
2 changed files with 16 additions and 0 deletions

View file

@ -1,5 +1,7 @@
2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (updateFrameSize:): Change resize increments if needed.
* nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
and getDirectory.

View file

@ -5448,12 +5448,26 @@ - (void) updateFrameSize: (BOOL) delay;
if (oldr != rows || oldc != cols || neww != oldw || newh != oldh)
{
struct frame *f = emacsframe;
NSView *view = FRAME_NS_VIEW (emacsframe);
NSWindow *win = [view window];
NSSize sz = [win resizeIncrements];
FRAME_PIXEL_WIDTH (emacsframe) = neww;
FRAME_PIXEL_HEIGHT (emacsframe) = newh;
change_frame_size (emacsframe, rows, cols, 0, delay, 0);
SET_FRAME_GARBAGED (emacsframe);
cancel_mouse_face (emacsframe);
// Did resize increments change because of a font change?
if (sz.width != FRAME_COLUMN_WIDTH (emacsframe) ||
sz.height != FRAME_LINE_HEIGHT (emacsframe))
{
sz.width = FRAME_COLUMN_WIDTH (emacsframe);
sz.height = FRAME_LINE_HEIGHT (emacsframe);
[win setResizeIncrements: sz];
}
[view setFrame: NSMakeRect (0, 0, neww, newh)];
[self windowDidMove:nil]; // Update top/left.
}