unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: martin rudalics <rudalics@gmx.at>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: frame size&position woes
Date: Mon, 22 Jul 2013 22:36:33 +0200	[thread overview]
Message-ID: <CAAeL0SSfu4o6h8RPhLPgnDEi4uMAWyrOQPCXcdWB29m7wLa7Fg@mail.gmail.com> (raw)
In-Reply-To: <837ggiy4ko.fsf@gnu.org>

On Mon, Jul 22, 2013 at 5:52 PM, Eli Zaretskii <eliz@gnu.org> wrote:

> Is your problem, in practice, only with those weirdo frames that have
> their tool bars and/or menu bars wrapped?  Or do you have problems
> with the more "dull" use cases as well?

Tool bars are much better behaved than menu bars, even when wrapped,
though there's bug#14795, that some consider a feature. "Dull" use
cases, as you say, don't pose any problem (or none related to frame
size anyway; there's still things to fix but unrelated to the physical
appearance of frames).

> If the latter, can you describe the unsolved problem(s) you have in
> that case?

The biggest problem right now is not related to frame-height, but
frame-pixel-height, that is, we'd need a function that returned (for
every available window system and toolkit) the real width & height of
an Emacs frame in pixels, not of the client area, but the whole frame.
It's the only sane way to check whether a frame is currently visible
in a monitor.

> People who wrap menus deserve that.

On one hand, I agree with you. It's ugly and I would never do it. On
the other hand, I'm not trying to make desktop-restore-frames work for
me, but for as many users as possible. And we have an elisp API to
create a frame without menu-bar or remove it from one (via frame
parameters), but I don't think we have a UI command to do that, so if
the user wants to use menus, but s/he also wants to have a narrow
frame for some reason (let's say, to follow the output of some command
which only prints short lines), s/he's forced to make the frame wider,
or accept a wrapped menu. If s/he then saves & restores...

> It's not complex.  AFAIK, "(make-frame '((height . N)))" creates a
> frame whose "(frame-height)" returns N plus the value returned by
> tool-bar-lines-needed.

I didn't even know that tool-bar-lines-needed existed. Anyway, I still
think it's horrible that height means something different for
make-frame and set-frame-parameter/modify-frame-parameters, but as
there are workarounds, I won't argue the point again.

> I expect the same to be true on X, with the
> exception of a GTK build, where we might need to do something special.

Well, let's hope someone tries desktop-restore-frames on GTK and
reports the result.

> Does this solve the problem with visible frames?  If not, what is
> left?

As said above, knowing their real, physical size in pixels, instead of
some Emacs interpretation of it in arbitrary "character" units, would
be helpful.

   Juanma



  reply	other threads:[~2013-07-22 20:36 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
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 [this message]
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=CAAeL0SSfu4o6h8RPhLPgnDEi4uMAWyrOQPCXcdWB29m7wLa7Fg@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=eliz@gnu.org \
    --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).