> I modified x_set_window_size to avoid this.  The attached patch is
> relative to the current SVN version.

I left in a few lines that should have been removed.  I have attached an
updated patch.

Vebjorn

--~--~---------~--~----~------------~-------~--~----~
Carbon Emacs User Group
http://groups.google.com/group/carbon-emacs?hl=en
-~----------~----~----~----~------~----~------~--~---

--- ../../../foo/CarbonEmacs/emacs/src/macterm.c	2008-07-11 15:16:15.000000000 -0400
+++ macterm.c	2008-07-11 16:18:37.000000000 -0400
@@ -5763,12 +5763,6 @@
 
   check_frame_size (f, &rows, &cols);
 
-  /* Refuse to set cols, rows, or both if in full-screen mode. */
-  if (f->want_fullscreen & FULLSCREEN_HEIGHT)
-    rows = FRAME_LINES (f);
-  if (f->want_fullscreen & FULLSCREEN_WIDTH)
-    cols = FRAME_COLS (f);
-
   f->scroll_bar_actual_width
     = FRAME_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f);
 
@@ -5780,6 +5774,17 @@
   f->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);
 
+  /* Refuse to change height, width, or both if in full-screen mode. */
+  Rect b;
+  OSStatus st = GetWindowBounds(FRAME_MAC_WINDOW (f), kWindowContentRgn, &b);
+  if (st == noErr)
+    {
+      if (f->want_fullscreen & FULLSCREEN_HEIGHT)
+        pixelheight = b.bottom - b.top;
+      if (f->want_fullscreen & FULLSCREEN_WIDTH)
+        pixelwidth = b.right - b.left;
+    }
+
   mac_size_window (FRAME_MAC_WINDOW (f), pixelwidth, pixelheight, 0);
 
 #if TARGET_API_MAC_CARBON

Reply via email to