emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115455: Various fixes around Bug#16013.


From: Martin Rudalics
Subject: [Emacs-diffs] trunk r115455: Various fixes around Bug#16013.
Date: Wed, 11 Dec 2013 10:04:18 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115455
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Wed 2013-12-11 11:03:46 +0100
message:
  Various fixes around Bug#16013.
  
  * window.c (resize_frame_windows): Don't return immediately when
  the root window's size doesn't change - the minibuffer window
  may still have to be repositioned/resized.
  * xfns.c (Fx_create_frame): Always change the frame size after
  initializing the frame's faces.
  * xterm.c (handle_one_xevent): Don't set pixel sizes here,
  change_frame_size should already have done it.
  (x_new_font): Assign new tool- and menu-bar heights.
  (x_set_window_size_1): Account for tool- and menu-bar heights
  (Bug#16013). Don't set pixel sizes since change_frame_size
  should already have done it.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/window.c                   window.c-20091113204419-o5vbwnq5f7feedwu-231
  src/xfns.c                     xfns.c-20091113204419-o5vbwnq5f7feedwu-274
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-12-11 05:37:30 +0000
+++ b/src/ChangeLog     2013-12-11 10:03:46 +0000
@@ -1,3 +1,17 @@
+2013-12-11  Martin Rudalics  <address@hidden>
+
+       * window.c (resize_frame_windows): Don't return immediately when
+       the root window's size doesn't change - the minibuffer window
+       may still have to be repositioned/resized.
+       * xfns.c (Fx_create_frame): Always change the frame size after
+       initializing the frame's faces.
+       * xterm.c (handle_one_xevent): Don't set pixel sizes here,
+       change_frame_size should already have done it.
+       (x_new_font): Assign new tool- and menu-bar heights.
+       (x_set_window_size_1): Account for tool- and menu-bar heights
+       (Bug#16013). Don't set pixel sizes since change_frame_size
+       should already have done it.
+
 2013-12-11  Paul Eggert  <address@hidden>
 
        Remove the option of using libcrypto.

=== modified file 'src/window.c'
--- a/src/window.c      2013-12-08 03:07:11 +0000
+++ b/src/window.c      2013-12-11 10:03:46 +0000
@@ -4057,7 +4057,7 @@
   r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);
 
   if (new_pixel_size == old_pixel_size)
-    return;
+    ;
   else if (WINDOW_LEAF_P (r))
     /* For a leaf root window just set the size.  */
     if (horflag)

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2013-12-03 17:22:05 +0000
+++ b/src/xfns.c        2013-12-11 10:03:46 +0000
@@ -3069,7 +3069,6 @@
      happen.  */
   init_frame_faces (f);
 
-#ifdef USE_GTK
   /* PXW: This is a duplicate from below.  We have to do it here since
      otherwise x_set_tool_bar_lines will work with the character sizes
      installed by init_frame_faces while the frame's pixel size is still
@@ -3078,12 +3077,8 @@
      non-pixelwise code apparently worked around this because it had one
      frame line vs one toolbar line which left us with a zero root
      window height which was obviously wrong as well ...  */
-  width = FRAME_TEXT_WIDTH (f);
-  height = FRAME_TEXT_HEIGHT (f);
-  FRAME_TEXT_HEIGHT (f) = 0;
-  SET_FRAME_WIDTH (f, 0);
-  change_frame_size (f, width, height, 1, 0, 0, 1);
-#endif /* USE_GTK */
+  change_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
+                    FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 1, 0, 0, 1);
 
   /* Set the menu-bar-lines and tool-bar-lines parameters.  We don't
      look up the X resources controlling the menu-bar and tool-bar

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2013-12-07 23:04:10 +0000
+++ b/src/xterm.c       2013-12-11 10:03:46 +0000
@@ -6622,8 +6622,8 @@
               cancel_mouse_face (f);
             }
 
-          FRAME_PIXEL_WIDTH (f) = event->xconfigure.width;
-          FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height;
+/**           FRAME_PIXEL_WIDTH (f) = event->xconfigure.width; **/
+/**           FRAME_PIXEL_HEIGHT (f) = event->xconfigure.height; **/
 #endif /* not USE_GTK */
 #endif
 
@@ -7689,6 +7689,9 @@
   FRAME_COLUMN_WIDTH (f) = font->average_width;
   FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font);
 
+  FRAME_TOOL_BAR_HEIGHT (f) = FRAME_TOOL_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
+  FRAME_MENU_BAR_HEIGHT (f) = FRAME_MENU_BAR_LINES (f) * FRAME_LINE_HEIGHT (f);
+
   compute_fringe_widths (f, 1);
 
   /* Compute the scroll bar width in character columns.  */
@@ -8541,13 +8544,15 @@
 
   compute_fringe_widths (f, 0);
 
-  pixelwidth =
-    (pixelwise ? width : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width))
-    + FRAME_TOOLBAR_WIDTH (f);
-  pixelheight =
-    (pixelwise ? height : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))
-    + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f);
-
+  pixelwidth = ((pixelwise
+                ? FRAME_TEXT_TO_PIXEL_WIDTH (f, width)
+                : FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, width))
+               + FRAME_TOOLBAR_WIDTH (f));
+  pixelheight = ((pixelwise
+                 ? FRAME_TEXT_TO_PIXEL_HEIGHT (f, height)
+                 : FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, height))
+                + FRAME_MENUBAR_HEIGHT (f)
+                + FRAME_TOOLBAR_HEIGHT (f));
   if (change_gravity) f->win_gravity = NorthWestGravity;
   x_wm_set_size_hint (f, (long) 0, 0);
   XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
@@ -8582,8 +8587,6 @@
   else
     {
       change_frame_size (f, width, height, 0, 1, 0, 1);
-      FRAME_PIXEL_WIDTH (f) = pixelwidth;
-      FRAME_PIXEL_HEIGHT (f) = pixelheight;
       x_sync (f);
     }
 }


reply via email to

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