# HG changeset patch # User Stefan Monnier # Date 1241578175 0 # Node ID 505b0e9f0379547f02e906bd3f3d37db85440dab # Parent 103cc47f370c081d61b26425f23bf1675c0284a0 (-windowDidResize:): Avoid inf-loop under GNUStep. diff -r 103cc47f370c -r 505b0e9f0379 src/ChangeLog --- a/src/ChangeLog Wed May 06 02:27:51 2009 +0000 +++ b/src/ChangeLog Wed May 06 02:49:35 2009 +0000 @@ -1,3 +1,7 @@ +2009-05-06 Stefan Monnier + + * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep. + 2009-05-06 YAMAMOTO Mitsuharu * keyboard.h (add_user_signal): Fix typo in extern. diff -r 103cc47f370c -r 505b0e9f0379 src/nsterm.m --- a/src/nsterm.m Wed May 06 02:27:51 2009 +0000 +++ b/src/nsterm.m Wed May 06 02:49:35 2009 +0000 @@ -1151,10 +1151,10 @@ 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 @@ } #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); }