unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 23.0.60; Resizing may delete windows
@ 2008-03-21 20:59 Lennart Borgman (gmail)
  2008-03-25 16:27 ` martin rudalics
  0 siblings, 1 reply; 44+ messages in thread
From: Lennart Borgman (gmail) @ 2008-03-21 20:59 UTC (permalink / raw)
  To: emacs-pretest-bug, Michael Kifer

Michael Kifer wrote:
 > OK, I see it. It is an emacs bug. If you have windows that are <
 > window-min-height then it deletes such windows if you de-maximize
 > the emacs window.
 >
 > To see this, maximize a window and do
 >
 > (let ((window-min-height 1)) (split-window-vertically 2))
 >
 > Then make this window normal size and see what happens.

Ok, thanks Michael. The upper window disappears for me too so it looks 
like a bug in Emacs and not a bug in ediff.

(Tested with Emacs 23 from today.)

	




^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: 23.0.60; Resizing may delete windows
@ 2008-04-20 12:23 martin rudalics
  2008-04-20 19:29 ` Stefan Monnier
  0 siblings, 1 reply; 44+ messages in thread
From: martin rudalics @ 2008-04-20 12:23 UTC (permalink / raw)
  To: monnier; +Cc: emacs-devel

 > It probably wants to delete the window because somewhere it (needlessly)
 > tries to resize it (to a smaller size, probably) and then checks the
 > size and decides to delete.  The problem is right there: not in any of
 > the settings of window-min-height.

Consider the following stretch from enlarge_window:

	  /* Add delta1 lines or columns to this window, and to the parent,
	     keeping things consistent while not affecting siblings.  */
	  XSETINT (CURSIZE (parent), opht + delta1);
	  (*setsizefun) (window, XINT (*sizep) + delta1, 0);

	  /* Squeeze out delta1 lines or columns from our parent,
	     shriking this window and siblings proportionately.
	     This brings parent back to correct size.
	     Delta1 was calculated so this makes this window the desired size,
	     taking it all out of the siblings.  */
	  (*setsizefun) (parent, opht, 0);

It calls size_window in the hope that size_window

(i) does not reduce the height of "this window", and

(ii) implicitly removes windows that have become "to small".


Now consider the code for changing the size of a frame: It eventually
winds up calling something like

	  set_window_height (FRAME_ROOT_WINDOW (f),
			     (newheight
			      - 1
			      - FRAME_TOP_MARGIN (f)),
			      0);

in the hope that size_window

(i) does not delete windows when they become "to small", as long as

(ii) there's at least one larger window it can steal lines from.


So it seems we want to eat our cake and have it too.






^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2008-04-20 19:29 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-21 20:59 23.0.60; Resizing may delete windows Lennart Borgman (gmail)
2008-03-25 16:27 ` martin rudalics
2008-03-25 17:21   ` Lennart Borgman (gmail)
2008-03-25 18:57     ` martin rudalics
2008-03-25 20:11       ` Lennart Borgman (gmail)
2008-03-25 22:10         ` martin rudalics
2008-03-25 22:54           ` Lennart Borgman (gmail)
2008-03-26  6:34             ` Michael Kifer
2008-03-26  7:48               ` martin rudalics
2008-03-26  9:38               ` Lennart Borgman (gmail)
2008-03-26 13:53                 ` Michael Kifer
2008-03-26 20:52                   ` Stefan Monnier
2008-03-26 18:53                     ` Michael Kifer
2008-03-27  0:02                       ` Lennart Borgman (gmail)
2008-03-27  2:23                         ` Michael Kifer
2008-03-27  2:17                       ` Stefan Monnier
2008-03-26 14:12               ` Dedicated windows (was: 23.0.60; Resizing may delete windows) Stefan Monnier
2008-03-26  7:38             ` 23.0.60; Resizing may delete windows martin rudalics
2008-03-26  9:32               ` Lennart Borgman (gmail)
2008-03-26 22:26                 ` Richard Stallman
2008-03-27  7:48                   ` martin rudalics
2008-03-26  1:55           ` Stefan Monnier
2008-03-26  7:40             ` martin rudalics
2008-03-26 14:25               ` Stefan Monnier
2008-03-26 17:11                 ` martin rudalics
2008-03-26 20:54                   ` Stefan Monnier
2008-03-26 22:30                     ` martin rudalics
2008-03-27  2:22                       ` Stefan Monnier
2008-03-27  7:50                         ` martin rudalics
2008-03-29  3:48                           ` Stefan Monnier
2008-04-02  8:43                             ` martin rudalics
2008-04-02 14:52                               ` Stefan Monnier
2008-04-02 17:04                                 ` martin rudalics
2008-04-03 13:56                                   ` Stefan Monnier
2008-04-03 14:43                                     ` martin rudalics
2008-04-03 15:03                                       ` Stefan Monnier
2008-04-03 15:19                                         ` martin rudalics
2008-04-03 20:52                                           ` Stefan Monnier
2008-04-03 21:47                                             ` martin rudalics
2008-04-03 22:16                                               ` Stefan Monnier
2008-04-04  6:55                                                 ` martin rudalics
2008-04-04 14:02                                                   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2008-04-20 12:23 martin rudalics
2008-04-20 19:29 ` Stefan Monnier

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).