Commit 6aba198c authored by Adrian Robert's avatar Adrian Robert
Browse files

* nsterm.m (EV_TIMESTAMP, x_set_window_size)

	(EmacsApp-application:openFiles:): Remove GNUstep conditionals.
	(EmacsScroller-setPosition:portion:whole:): Remove -display call
	under GNUstep.
	(EmacsView-initFrameFromEmacs:): Set autoresizing mask.
parent 4f02f0c9
......@@ -248,12 +248,7 @@ the Function modifer (laptops). May be any of the modifier lisp symbols. */
[e buttonNumber] - 1)
/* Convert the time field to a timestamp in milliseconds. */
#ifdef NS_IMPL_GNUSTEP
/* Apple says timestamp is in seconds, but GNUstep seems to be returning msec */
#define EV_TIMESTAMP(e) ([e timestamp])
#else
#define EV_TIMESTAMP(e) ([e timestamp] * 1000)
#endif /* not gnustep */
/* This is a piece of code which is common to all the event handling
methods. Maybe it should even be a function. */
......@@ -1139,19 +1134,12 @@ Free a pool and temporary objects it refers to (callable from C)
/* If we have a toolbar, take its height into account. */
if (tb)
/* NOTE: previously this would generate wrong result if toolbar not
yet displayed and fixing toolbar_height=32 helped, but
now (200903) seems no longer needed */
FRAME_NS_TOOLBAR_HEIGHT (f) =
/* XXX: GNUstep has not yet implemented the first method below, added
in Panther, however the second is incorrect under Cocoa. */
#ifdef NS_IMPL_COCOA
NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
/* NOTE: previously this would generate wrong result if toolbar not
yet displayed and fixing toolbar_height=32 helped, but
now (200903) seems no longer needed */
#else
NSHeight ([NSWindow frameRectForContentRect: NSMakeRect (0, 0, 0, 0)
styleMask: [window styleMask]])
#endif
- FRAME_NS_TITLEBAR_HEIGHT (f);
- FRAME_NS_TITLEBAR_HEIGHT (f);
else
FRAME_NS_TOOLBAR_HEIGHT (f) = 0;
......@@ -4155,11 +4143,7 @@ - (void)application: sender openFiles: (NSArray *)fileList
while ((file = [files nextObject]) != nil)
[ns_pending_files addObject: file];
/* TODO: when GNUstep implements this (and we require that version of
GNUstep), remove. */
#ifndef NS_IMPL_GNUSTEP
[self replyToOpenOrPrint: NSApplicationDelegateReplySuccess];
#endif /* !NS_IMPL_GNUSTEP */
}
......@@ -5100,6 +5084,7 @@ - (BOOL)isOpaque
r = NSMakeRect (0, 0, FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, f->text_cols),
FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, f->text_lines));
[self initWithFrame: r];
[self setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
FRAME_NS_VIEW (f) = self;
emacsframe = f;
......@@ -5711,8 +5696,13 @@ + (float) scrollerWidth
[self setEnabled: YES];
/* Ensure auto resizing of scrollbars occurs within the emacs frame's view
locked against the right, top and bottom edges. */
locked against the top and bottom edges, and right edge on OS X, where
scrollers are on right. */
#ifdef NS_IMPL_GNUSTEP
[self setAutoresizingMask: NSViewMaxXMargin | NSViewHeightSizable];
#else
[self setAutoresizingMask: NSViewMinXMargin | NSViewHeightSizable];
#endif
win = nwin;
condemned = NO;
......@@ -5833,9 +5823,6 @@ - (int) checkSamePosition: (int) position portion: (int) portion
por = (float)portion/whole;
[self setFloatValue: pos knobProportion: por];
}
#ifdef NS_IMPL_GNUSTEP
[self display];
#endif
return self;
}
......
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