summaryrefslogtreecommitdiff
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2009-05-06 02:49:35 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2009-05-06 02:49:35 +0000
commitce1b23bb4edc6a43f9fae2d2a8f57a21c144d311 (patch)
tree981fa2d73110f8520a610204030627ed59e6c6e6 /src/nsterm.m
parentbcda200f6a983541782e326144778db4096ba805 (diff)
downloademacs-ce1b23bb4edc6a43f9fae2d2a8f57a21c144d311.tar.gz
(-windowDidResize:): Avoid inf-loop under GNUStep.
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 5f1c50cc48d..3ec7a34f277 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1151,10 +1151,10 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
/* If we have a toolbar, take its height into account. */
- /* XXX: GNUstep has not yet implemented the first method below, added
- in Panther, however the second is incorrect under Cocoa. */
if (tb)
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
@@ -5059,8 +5059,14 @@ extern void update_window_cursor (struct window *w, int on);
}
#endif /* NS_IMPL_COCOA */
+ // Calling x_set_window_size tends to get us into inf-loops
+ // (x_set_window_size causes a resize which causes
+ // a "windowDidResize" which calls x_set_window_size).
+ // At least with GNUStep, don't know about MacOSX. --Stef
+#ifndef NS_IMPL_GNUSTEP
if (cols > 0 && rows > 0)
- x_set_window_size (emacsframe, 0, cols, rows);
+ x_set_window_size (emacsframe, 0, cols, rows);
+#endif
ns_send_appdefined (-1);
}