emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: mouse-drag-vertical-line or mouse-drag-mode-line fai


From: Richard Stallman
Subject: Re: address@hidden: mouse-drag-vertical-line or mouse-drag-mode-line failed with complex window split]
Date: Thu, 15 Jun 2006 11:09:54 -0400

Does this fix it?

*** window.c    13 Jun 2006 19:07:16 -0400      1.549
--- window.c    15 Jun 2006 10:19:24 -0400      
***************
*** 63,69 ****
  static void window_scroll_line_based P_ ((Lisp_Object, int, int, int));
  static int window_min_size_1 P_ ((struct window *, int));
  static int window_min_size P_ ((struct window *, int, int, int *));
! static void size_window P_ ((Lisp_Object, int, int, int));
  static int freeze_window_start P_ ((struct window *, void *));
  static int window_fixed_size_p P_ ((struct window *, int, int));
  static void enlarge_window P_ ((Lisp_Object, int, int));
--- 63,69 ----
  static void window_scroll_line_based P_ ((Lisp_Object, int, int, int));
  static int window_min_size_1 P_ ((struct window *, int));
  static int window_min_size P_ ((struct window *, int, int, int *));
! static void size_window P_ ((Lisp_Object, int, int, int, int));
  static int freeze_window_start P_ ((struct window *, void *));
  static int window_fixed_size_p P_ ((struct window *, int, int));
  static void enlarge_window P_ ((Lisp_Object, int, int));
***************
*** 2826,2832 ****
  
  /* Set WINDOW's height or width to SIZE.  WIDTH_P non-zero means set
     WINDOW's width.  Resize WINDOW's children, if any, so that they
!    keep their proportionate size relative to WINDOW.  Propagate
     WINDOW's top or left edge position to children.  Delete windows
     that become too small unless NODELETE_P is non-zero.
  
--- 2826,2836 ----
  
  /* Set WINDOW's height or width to SIZE.  WIDTH_P non-zero means set
     WINDOW's width.  Resize WINDOW's children, if any, so that they
!    keep their proportionate size relative to WINDOW, but if LAST_P
!    is 1, change only the last of WINDOW's children when they
!    are in series.
! 
!   Propagate
     WINDOW's top or left edge position to children.  Delete windows
     that become too small unless NODELETE_P is non-zero.
  
***************
*** 2834,2840 ****
     too small, even if they were too small before!  */
  
  static void
! size_window (window, size, width_p, nodelete_p)
       Lisp_Object window;
       int size, width_p, nodelete_p;
  {
--- 2838,2844 ----
     too small, even if they were too small before!  */
  
  static void
! size_window (window, size, width_p, nodelete_p, last_p)
       Lisp_Object window;
       int size, width_p, nodelete_p;
  {
***************
*** 2911,2916 ****
--- 2915,2921 ----
  
    if (!NILP (*sideward))
      {
+       /* We have a chain of parallel siblings whose size should all change.  
*/
        for (child = *sideward; !NILP (child); child = c->next)
        {
          c = XWINDOW (child);
***************
*** 2918,2925 ****
            c->left_col = w->left_col;
          else
            c->top_line = w->top_line;
!         size_window (child, size, width_p, nodelete_p);
        }
      }
    else if (!NILP (*forward))
      {
--- 2923,2947 ----
            c->left_col = w->left_col;
          else
            c->top_line = w->top_line;
!         size_window (child, size, width_p, nodelete_p, last_p);
!       }
!     }
!   else if (!NILP (*forward) && last_p)
!     {
!       /* Change the last in a series of siblings.  */
!       Lisp_Object last_child;
!       int child_size;
! 
!       for (child = *forward; !NILP (child); child = c->next)
!       {
!         c = XWINDOW (child);
!         last_child = child;
        }
+ 
+       child_size = XINT (width_p ? c->total_cols : c->total_lines);
+       size_window (last_child,
+                  size - old_size + child_size,
+                  width_p, nodelete_p, last_p);
      }
    else if (!NILP (*forward))
      {
***************
*** 2928,2934 ****
        int last_pos, first_pos, nchildren, total;
        int *new_sizes = NULL;
  
!       /* Determine the fixed-size portion of the this window, and the
         number of child windows.  */
        fixed_size = nchildren = nfixed = total = 0;
        for (child = *forward; !NILP (child); child = c->next, ++nchildren)
--- 2950,2956 ----
        int last_pos, first_pos, nchildren, total;
        int *new_sizes = NULL;
  
!       /* Determine the fixed-size portion of this window, and the
         number of child windows.  */
        fixed_size = nchildren = nfixed = total = 0;
        for (child = *forward; !NILP (child); child = c->next, ++nchildren)
***************
*** 2991,2997 ****
          /* Set new height.  Note that size_window also propagates
             edge positions to children, so it's not a no-op if we
             didn't change the child's size.  */
!         size_window (child, new_size, width_p, 1);
  
          /* Remember the bottom/right edge position of this child; it
             will be used to set the top/left edge of the next child.  */
--- 3013,3019 ----
          /* Set new height.  Note that size_window also propagates
             edge positions to children, so it's not a no-op if we
             didn't change the child's size.  */
!         size_window (child, new_size, width_p, 1, last_p);
  
          /* Remember the bottom/right edge position of this child; it
             will be used to set the top/left edge of the next child.  */
***************
*** 3010,3016 ****
            int child_size;
            c = XWINDOW (child);
            child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines);
!           size_window (child, child_size, width_p, 2);
          }
      }
  }
--- 3032,3038 ----
            int child_size;
            c = XWINDOW (child);
            child_size = width_p ? XINT (c->total_cols) : XINT (c->total_lines);
!           size_window (child, child_size, width_p, 2, last_p);
          }
      }
  }
***************
*** 3026,3032 ****
       int height;
       int nodelete;
  {
!   size_window (window, height, 0, nodelete);
  }
  
  
--- 3048,3054 ----
       int height;
       int nodelete;
  {
!   size_window (window, height, 0, nodelete, 0);
  }
  
  
***************
*** 3041,3047 ****
       int width;
       int nodelete;
  {
!   size_window (window, width, 1, nodelete);
  }
  
  /* Change window heights in windows rooted in WINDOW by N lines.  */
--- 3063,3069 ----
       int width;
       int nodelete;
  {
!   size_window (window, width, 1, nodelete, 0);
  }
  
  /* Change window heights in windows rooted in WINDOW by N lines.  */
***************
*** 4281,4288 ****
  
        if (NILP (window))
        {
!         /* This can happen if WINDOW on the previous iteration was
!            at top level of the tree and we did not exit.  */
          Fset_window_configuration (old_config);
          error ("Specified window edge is fixed");
        }
--- 4303,4310 ----
  
        if (NILP (window))
        {
!         /* This happens if WINDOW on the previous iteration was
!            at top level of the window tree.  */
          Fset_window_configuration (old_config);
          error ("Specified window edge is fixed");
        }
***************
*** 4304,4311 ****
        }
  
        /* If this level's succession is in the desired dimension,
!        and this window is the last one, its trailing edge is fixed.  */
!       if (NILP (XWINDOW (window)->next) && NILP (first_parallel))
        {
          Fset_window_configuration (old_config);
          error ("Specified window edge is fixed");
--- 4326,4335 ----
        }
  
        /* If this level's succession is in the desired dimension,
!        and this window is the last one, and there is no higher level,
!        its trailing edge is fixed.  */
!       if (NILP (XWINDOW (window)->next) && NILP (first_parallel)
!         && NILP (parent))
        {
          Fset_window_configuration (old_config);
          error ("Specified window edge is fixed");
***************
*** 4347,4353 ****
              XSETINT (CURBEG (p->next),
                       XINT (CURBEG (p->next)) + delta);
              size_window (p->next, XINT (CURSIZE (p->next)) - delta,
!                          horiz_flag, 0);
              break;
            }
        }
--- 4371,4377 ----
              XSETINT (CURBEG (p->next),
                       XINT (CURBEG (p->next)) + delta);
              size_window (p->next, XINT (CURSIZE (p->next)) - delta,
!                          horiz_flag, 0, 1);
              break;
            }
        }
***************
*** 4359,4365 ****
             child = XWINDOW (child)->next)
          if (! EQ (child, window))
            size_window (child, XINT (CURSIZE (child)) + delta,
!                        horiz_flag, 0);
  
        window = parent;
      }
--- 4383,4389 ----
             child = XWINDOW (child)->next)
          if (! EQ (child, window))
            size_window (child, XINT (CURSIZE (child)) + delta,
!                        horiz_flag, 0, 1);
  
        window = parent;
      }




reply via email to

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