[Top][All Lists]

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

RE: Minimum frame size in Windows

From: Drew Adams
Subject: RE: Minimum frame size in Windows
Date: Tue, 12 Dec 2006 13:37:00 -0800

> > You initially spoke of limiting the "size" to the "window caption"
> Perhaps in an alternate world; in this one, I said: "There's an old
> hack in src/w32fns.c to avoid the user resizing an Emacs frame below
> the minimum tracking size (else the user can, for example, make a
> window showing only a fraction of the window caption, which looks
> ugly)." That's textual from my message.

My point was that you spoke of "size", not "height", and I naturally assumed 
that you meant width as well as height. You said that you wanted to avoid users 
resizing the frame to a fraction of the (size of the) "window caption". I think 
my quoting was accurate in this world too ;-), and my point was that, by 
"size", I thought you meant width too - in particular, the width of the window 

> > (frame title, I guess).
> "Window caption" is the right term, according to the docs. I'm mostly
> talking about Windows windows, not Emacs frames (even if they happen
> to be the same in this case).
> > I think now that you're speaking only of imposing a frame 
> > height limit, not a width limit.
> I'm talking about honoring the system defaults.
> > I guess you're saying that a width limit is already imposed by 
> > the system, and that is roughly the width of the icons used in 
> > the title bar, plus maybe two title characters (at least that's 
> > what I see in your image). Is that correct?
> Yes.
> > Do you just want to limit the height, not the width?
> Both, thought limiting the width is redundant; Emacs already respects

I don't know what that means. Does it mean that you won't change the minimum 
width or that the new minimum width ("size") would depend on the current window 
caption? I don't want a frame with a long title to have a different minimum 
width from one with a short title.

> > If so, what is the height limit that you want to impose - one 
> > frame-char height?
> GetSystemMetrics (SM_CYMINTRACK), which is enough to show the 
> window caption.
> > Why?
> What is the purpose of having a window like the one in the image I
> sent in my previous message?

Dunno. What is the purpose of prohibiting it, beyond ugliness?

> > I still don't understand the problem you are trying to fix.
> User-friendliness. Compatibility with the environment UI guidelines.

Bof. Please elaborate, if it's really important.

> > That's not a good reason to impose a size limitation, IMO.
> The size limitation exists already.

Apparently not in Emacs - your screenshot shows that. And the same thing is 
true of Emacs going back to at least version 20 (which might be the first 
Windows version).

> > Someone might have a reason to shrink a frame to a tiny size, 
> > perhaps in a way that is unrelated to character size.
> And how do you pretend to do that currently with Emacs on Windows? Are
> you suggesting *adding* machinery to allow sub-line frames with no
> caption?

You already did that yourself with Emacs on Windows, to create the screenshot. 
I don't pretend to do anything; I'm not suggesting changing anything. You are.

> > Please describe the real problem.
> Please, describe the use of such a window, and how do you pretend to
> create and manipulate them. You're the one suggesting adding things,

I'm not suggesting changing or adding a single thing - you are. What is the 
problem you are trying to fix? What's wrong with letting a user do what you did 
with your frame? What does it hurt? There may be no obvious purpose to it, but 
what does it hurt?

> If someday we add support for such tiny windows, we can make an
> exception. In fact, the existing code already *has* such exception for
> the only windows (frames) that need it: tooltips.
> > I have code that resizes frames, and it lets users set their 
> > own minimum frame dimensions. I would not like Emacs to impose 
> > some hard-coded minimum.
> Does your code really give the user a way to make windows (frames)
> smaller than the one in my sample image? On Windows? How do you do
> that?

No, and I never said it did. Why do you say "smaller"? I have no problem with 
the frame in your screenshot. My impression is that you have a problem with it. 
I thought you wanted to make the limits bigger than the screenshot; it's not I 
who wants something smaller than that.

My point in mentioning my code was that if an application wants to impose a 
size limit, it can do so, possibly under user control, in Lisp. You haven't 
given any reason to hard-code a larger size in C. Let applications and users 
fix the limits, unless there is a good reason to prevent that.

> > If a given OS or window manager imposes a minimum, so be it, 
> > but why make Emacs impose a minimum also?
> Windows imposes a limit. We're respecting it. Badly. It works for
> width, because the code does *not* try to adjust width. It fails for
> height. I'm not adding a new feature, much as you seem intend on
> presenting it as such. I'm proposing fixing a bug.

Well, I don't see it as a bug. Beyond ugliness, you haven't said what needs to 
be fixed.

Frankly, if the size limit you propose is the same as your screen shot in 
width, and it is the full height of the title bar in height, I don't have a 
problem with that. It just means showing a full-height title bar, instead of a 
partial-height one. No big deal.

I don't see why you would make that change, but I don't really care, if that's 
all you want to do. My main concern was to make sure you were not going to 
impose a larger size limit than that (in particular, for the width). If you had 
said from the beginning that you just wanted to show the full _height_ of the 
title bar, I wouldn't have replied at all.

reply via email to

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