unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: frame size&position woes
Date: Sun, 21 Jul 2013 17:42:00 +0200	[thread overview]
Message-ID: <CAAeL0SQjxUeS6JP+gc64-i73BtVF0Sa3tknz69k7vXL3u6g-9w@mail.gmail.com> (raw)
In-Reply-To: <51EBEA23.2000805@gmx.at>

On Sun, Jul 21, 2013 at 4:03 PM, martin rudalics <rudalics@gmx.at> wrote:

> Gets me still 36 (wrapping _before_ "Help").

Yep, that depends on the font, etc. But the menu for the minibuffer
has fewer items that the menu for lisp-interaction, so if you play a
little with the frame width, you'll get to a point where the menu for
the main window is wrapped, but still M-: (frame-height) <RET> gets
you the same size that if it weren't, because during M-:
(frame-height), it is not.

>> (1) is the "real" height, or at least, what we do say that's the real
>> height.
>
> It's not possible to tell what the real height of a frame is.

Didn't I say as much?

>> (2) happens even when (frame-parameter nil 'menu-bar-lines) is still 1
>
> FWIW this parameter is ignored on Windows since the later itself resizes
> the menubar (basically, we'd have to deduce the number of lines from the
> frame heights).

Yes, so perhaps the trouble that I'm reporting only happens on
Windows. It's still quite real and annoying, though.

> One can, however, truncate menubars on Windows which is
> the default on GNU/Linux

Assuming that IUYC, I'm surprised that's the default on GNU/Linux. Is
there any key combo or another UI element to get to the truncated menu
entries?

>> (3) happens (depending on your default font, I suppose), because when you
>> do
>>     M-: whatever you're using the minibuffer menu, which has less items.
>
> I'm not sure what you mean here.  Note that on Windows the toolbar is
> included in the frame's height.

I'm not talking about the toolbar, but what I explained above, about
the wrapped menu bar.

> IIRC Windows won't tell you whether it wrapped the menubar.  So you can
> tell only by comparing the sizes of the outer rectangle and the client
> rectangle taking into account the font of the menubar.

Wonderful. All this boils down to something we discussed earlier: it
would be useful to have an API to get the height of a complete frame,
in some units (pixels, etc.), like frame-pixel-height, but coherent
across toolkits. And, a way to create or resize a frame using these
same units; I don't think that's possible right now, is it?

> I never tried too experiment with invisible frames and getting
> information from them.  Maybe they could be used here.

I've tried making frames invisible and trying to extract information
from them. Doesn't really work (depends on the info, I think) and
making a frame invisible and visible again is also user noticeable.

> On Windows you should be able to get the normal position and size of an
> iconified frame.  I'm not sure about other systems.  In the worst case
> we'd have to save them before processing an iconify request.

But it is not really useful if it's not done for all window systems /
GUI toolkits.

> We could "store" the values softly, that is, not via
> `modify-frame-parameters'.

When and how? Storing them via m-f-p is not a problem, as long as they
are not called left/top/width/height, BTW.

> We have not even agreed upon what frame metrics are.  Asking here will
> get you at least five different opinions.

Yep. But meanwhile, what we have is a mishmash of metrics, options,
units and whatnot.

   J



  reply	other threads:[~2013-07-21 15:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21 12:56 frame size&position woes Juanma Barranquero
2013-07-21 12:58 ` Juanma Barranquero
2013-07-21 14:03 ` martin rudalics
2013-07-21 15:42   ` Juanma Barranquero [this message]
2013-07-21 15:58     ` Juanma Barranquero
2013-07-22  8:22     ` martin rudalics
2013-07-22  9:40       ` Juanma Barranquero
2013-07-22 15:52         ` Eli Zaretskii
2013-07-22 20:36           ` Juanma Barranquero
2013-07-23  2:45             ` Eli Zaretskii
2013-07-23 23:47               ` Juanma Barranquero
2013-07-24  3:55                 ` Eli Zaretskii
2013-07-24 10:42                   ` Juanma Barranquero
2013-07-24 14:37                     ` Eli Zaretskii
2013-07-24 14:51                       ` Juanma Barranquero
2013-07-24 16:55                         ` Eli Zaretskii
2013-07-24 17:01                           ` Juanma Barranquero
2013-07-24 17:41                             ` Eli Zaretskii
2013-07-24 17:49                               ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAeL0SQjxUeS6JP+gc64-i73BtVF0Sa3tknz69k7vXL3u6g-9w@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).