summaryrefslogtreecommitdiff
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2011-09-30 09:42:26 +0200
committerJan Djärv <jan.h.d@swipnet.se>2011-09-30 09:42:26 +0200
commit9ceebf39d984e4415dbb9ae62e883902051257c8 (patch)
tree8c10efafd65257cb2b1a192a0db6b6540788eb66 /src/nsterm.m
parent04c7078847acf841ee45c24007ef9615db57e595 (diff)
downloademacs-9ceebf39d984e4415dbb9ae62e883902051257c8.tar.gz
* nsterm.m (windowDidResize): Call x_set_window_size only when
ns_in_resize is true. Otherwise set pixelwidth/height and call change_frame_size. Fixes: debbugs:9628
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 827404a2974..a2ae5e69512 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5357,7 +5357,23 @@ ns_term_shutdown (int sig)
a "windowDidResize" which calls x_set_window_size). */
#ifndef NS_IMPL_GNUSTEP
if (cols > 0 && rows > 0)
- x_set_window_size (emacsframe, 0, cols, rows);
+ {
+ if (ns_in_resize)
+ x_set_window_size (emacsframe, 0, cols, rows);
+ else
+ {
+ NSWindow *window = [self window];
+ NSRect wr = [window frame];
+ FRAME_PIXEL_WIDTH (emacsframe) = (int)wr.size.width
+ - emacsframe->border_width;
+ FRAME_PIXEL_HEIGHT (emacsframe) = (int)wr.size.height
+ - FRAME_NS_TITLEBAR_HEIGHT (emacsframe)
+ - FRAME_TOOLBAR_HEIGHT (emacsframe);
+ change_frame_size (emacsframe, rows, cols, 0, 0, 1);
+ SET_FRAME_GARBAGED (emacsframe);
+ cancel_mouse_face (emacsframe);
+ }
+ }
#endif
ns_send_appdefined (-1);