Subject: bug#14326: 24.3; Conflict of w32-send-sys-command and set-default-font

From: "Drew Adams" <[email-masked]>
Date: Fri, 3 May 2013 11:19:25 -0700

> > > > Is the intention that one cannot change the size, once 
> > > > a frame has been maximized (without first unmaximizing it)?
> > > 
> > > There's no such intention.  What Martin is arguing (I think)
> > > was that in a maximized frame, set-default-font should alway 
> > > behave as if its 2nd argument were non-nil.
> > 
> > Why should it?
> > 
> > Especially given the statement that there is no intention 
> > that one must unmaximize a frame before changing its size.
> > 
> > If we impose such a behavior for `set-default-font' then it 
> > means that in that case there _is_ such an intention: one
> > would need to unmaximize the frame first, before using
> > `set-default-font' with nil KEEP-SIZE, to make a nil KEEP-SIZE
> > value (the default!) be respected.  Why such an exception?
> 
> Because the frame is maximized.
> 
> Let me turn the table and ask you: why would you want to have the
> frame resized just because you changed the font?

Perhaps I am misunderstanding.

I thought you said that to resize the frame when it has been maximized one does
NOT need to first unmaximize it: just go ahead and change the frame parameters
that establish the new size.

And I thought you said that trying to resize the frame by using `set-frame-font'
(with nil KEEP-SIZE: the default) would be an exception to this.  To resize the
frame using `set-frame-font' you would first need to unmaximize the frame.

If I understand correctly so far then my question is why resizing the frame
using `set-frame-font' (with nil KEEP-SIZE) should be an exception.

As to why one might "want to have the frame resized just because you changed the
font": that is precisely the point of `set-frame-size' with nil KEEP-SIZE (which
is the *default* behavior, not some crazy, exceptional behavior).  (More
precisely, resizing the frame is one of the intended effects if the new font
size is different.)

`set-frame-font' resizes the frame, by default, if the new font size is
different.  That is what it is supposed to do.

Since `set-frame-font' is one way of changing the frame size, and (I think) you
said that to resize a maximized frame you need not first unmaximize it, why
should that not be the case also for resizing using `set-frame-font'?