emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105965: * nsterm.m (windowDidResize)


From: Jan D.
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105965: * nsterm.m (windowDidResize): Call x_set_window_size only when
Date: Fri, 30 Sep 2011 09:42:26 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105965
fixes bug(s): http://debbugs.gnu.org/9628
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Fri 2011-09-30 09:42:26 +0200
message:
  * nsterm.m (windowDidResize): Call x_set_window_size only when
  ns_in_resize is true.  Otherwise set pixelwidth/height and
  call change_frame_size.
modified:
  src/ChangeLog
  src/nsterm.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-30 07:25:15 +0000
+++ b/src/ChangeLog     2011-09-30 07:42:26 +0000
@@ -1,3 +1,9 @@
+2011-09-30  Jan Djärv  <address@hidden>
+
+       * nsterm.m (windowDidResize): Call x_set_window_size only when
+       ns_in_resize is true.  Otherwise set pixelwidth/height and
+       call change_frame_size (Bug#9628).
+
 2011-09-30  Paul Eggert  <address@hidden>
 
        Port --enable-checking=all to Fedora 14 x86-64.

=== modified file 'src/nsterm.m'
--- a/src/nsterm.m      2011-08-29 19:09:16 +0000
+++ b/src/nsterm.m      2011-09-30 07:42:26 +0000
@@ -5357,7 +5357,23 @@
      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);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]