aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2009-05-06 02:49:35 +0000
committerStefan Monnier2009-05-06 02:49:35 +0000
commitce1b23bb4edc6a43f9fae2d2a8f57a21c144d311 (patch)
tree981fa2d73110f8520a610204030627ed59e6c6e6 /src
parentbcda200f6a983541782e326144778db4096ba805 (diff)
downloademacs-ce1b23bb4edc6a43f9fae2d2a8f57a21c144d311.tar.gz
emacs-ce1b23bb4edc6a43f9fae2d2a8f57a21c144d311.zip
(-windowDidResize:): Avoid inf-loop under GNUStep.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/nsterm.m12
2 files changed, 13 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f68a937aa5e..b3f5bb483fa 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12009-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep.
4
12009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 52009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 6
3 * keyboard.h (add_user_signal): Fix typo in extern. 7 * keyboard.h (add_user_signal): Fix typo in extern.
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)
1151 pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); 1151 pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
1152 1152
1153 /* If we have a toolbar, take its height into account. */ 1153 /* If we have a toolbar, take its height into account. */
1154 /* XXX: GNUstep has not yet implemented the first method below, added
1155 in Panther, however the second is incorrect under Cocoa. */
1156 if (tb) 1154 if (tb)
1157 FRAME_NS_TOOLBAR_HEIGHT (f) = 1155 FRAME_NS_TOOLBAR_HEIGHT (f) =
1156 /* XXX: GNUstep has not yet implemented the first method below, added
1157 in Panther, however the second is incorrect under Cocoa. */
1158#ifdef NS_IMPL_COCOA 1158#ifdef NS_IMPL_COCOA
1159 NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)]) 1159 NSHeight ([window frameRectForContentRect: NSMakeRect (0, 0, 0, 0)])
1160 /* NOTE: previously this would generate wrong result if toolbar not 1160 /* NOTE: previously this would generate wrong result if toolbar not
@@ -5059,8 +5059,14 @@ extern void update_window_cursor (struct window *w, int on);
5059 } 5059 }
5060#endif /* NS_IMPL_COCOA */ 5060#endif /* NS_IMPL_COCOA */
5061 5061
5062 // Calling x_set_window_size tends to get us into inf-loops
5063 // (x_set_window_size causes a resize which causes
5064 // a "windowDidResize" which calls x_set_window_size).
5065 // At least with GNUStep, don't know about MacOSX. --Stef
5066#ifndef NS_IMPL_GNUSTEP
5062 if (cols > 0 && rows > 0) 5067 if (cols > 0 && rows > 0)
5063 x_set_window_size (emacsframe, 0, cols, rows); 5068 x_set_window_size (emacsframe, 0, cols, rows);
5069#endif
5064 5070
5065 ns_send_appdefined (-1); 5071 ns_send_appdefined (-1);
5066} 5072}