* Can't enlarge a window by dragging the header line
@ 2004-10-13 10:33 David PONCE
2004-10-15 0:25 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: David PONCE @ 2004-10-13 10:33 UTC (permalink / raw)
Hi,
In GNU Emacs 21.3.50.7 (i686-pc-linux-gnu, GTK+ Version 2.4.7)
of 2004-10-13 on localhost
configured using `configure '--with-gtk'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
I noticed that dragging the header line of a window not at top of
frame, does not permit to enlarge the window. To reproduce:
emacs -q -no-site-file
C-h i
C-x 2
Dragging the header line of the bottom window down works, dragging it
up does nothing. To enlarge the window again it is necessary to
drag the mode line of the window above.
IMHO, it looks like a bug. Following is a patch to lisp/mouse.el
which fixes it. What do you think?
Regards.
David
2004-10-13 David Ponce <david@dponce.com>
* mouse.el (mouse-drag-move-window-top): New function.
(mouse-drag-mode-line-1): Use it.
Index: lisp/mouse.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/mouse.el,v
retrieving revision 1.249
diff -c -r1.249 mouse.el
*** lisp/mouse.el 9 Jul 2004 16:54:04 -0000 1.249
--- lisp/mouse.el 13 Oct 2004 10:04:28 -0000
***************
*** 338,343 ****
--- 338,354 ----
(select-window window)
(enlarge-window growth nil (> growth 0))))
+ (defsubst mouse-drag-move-window-top (window growth)
+ "Move the top of WINDOW up or down by GROWTH lines.
+ Move it down if GROWTH is positive, or up if GROWTH is negative.
+ If this would make WINDOW too short, shrink the window or windows
+ above it to make room."
+ ;; Moving the top of WINDOW is actually moving the bottom of the
+ ;; window above.
+ (let ((window-above (mouse-drag-window-above window)))
+ (and window-above
+ (mouse-drag-move-window-bottom window-above (- growth)))))
+
(defun mouse-drag-mode-line-1 (start-event mode-line-p)
"Change the height of a window by dragging on the mode or header line.
START-EVENT is the starting mouse-event of the drag action.
***************
*** 444,450 ****
(select-window start-event-window))
;; no. grow/shrink the selected window
;(message "growth = %d" growth)
! (mouse-drag-move-window-bottom start-event-window growth))
;; if this window's growth caused another
;; window to be deleted because it was too
--- 455,463 ----
(select-window start-event-window))
;; no. grow/shrink the selected window
;(message "growth = %d" growth)
! (if mode-line-p
! (mouse-drag-move-window-bottom start-event-window growth)
! (mouse-drag-move-window-top start-event-window growth)))
;; if this window's growth caused another
;; window to be deleted because it was too
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can't enlarge a window by dragging the header line
2004-10-13 10:33 Can't enlarge a window by dragging the header line David PONCE
@ 2004-10-15 0:25 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2004-10-15 0:25 UTC (permalink / raw)
Cc: emacs-devel
If nobody objects in 3 days, please install your patch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-15 0:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-13 10:33 Can't enlarge a window by dragging the header line David PONCE
2004-10-15 0:25 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).