Commit 960ce480 authored by Jan Djärv's avatar Jan Djärv
Browse files

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

parent 8f2906f5
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.
......
......@@ -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.
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment