unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: "16013@debbugs.gnu.org" <16013@debbugs.gnu.org>
Subject: bug#16013: 24.3.50; Rows in height is interpreted as pixels.
Date: Thu, 16 Jan 2014 11:03:32 +0100	[thread overview]
Message-ID: <52D7AE74.70302@gmx.at> (raw)
In-Reply-To: <C8B9DC22-F152-42AE-B299-D52B32247AD2@swipnet.se>

Michael Welsh Duggan schrieb:
 > Stefan Monnier <monnier@iro.umontreal.ca> writes:
 >
 >>> I know I am opening up a can of worms here, but I am going to argue that
 >>> `C-x SPC' be changed back to `gud-break'.
 >> Oddly enough there hasn't been the expected deluge of opinions.
 >
 > It surprises me, too.  My only guess is that people just don't use gdb
 > in emacs much, or they tend to use the mouse to set breakpoints.  (I
 > highly doubt people are using `C-x C-a C-b'.)  I guess I'll just have to
 > suggest rebinding it in gud-gdb-mode-hook to people who like it better
 > the way it was before.
 >
 > I know that the documentation updates are still a work in progress, but
 > please make sure current references to `C-x SPC' in the manual are
 > changed to `C-x C-a C-b' respectively.
 >

 >> I frequently asked on this list what `frame-height' and especially the
 >> "number of lines available for display" stands for, but never got an
 >> answer I could understand.
 >
 >
 > This has been inconsistent historically, i.e. Lucid/Motif/No toolkit counts differently than Gtk/NS.
 > I think the Gtk count makes more sense.  If a user requests 50 lines he probably means 50 editable lines, not 47.  So I think we should not count tool bar or menu bar.
 > The documentation says
 > "The height of the frame contents, in characters."
 > I don't think menu and tool bar is content.

I'm not sure what to do.  There's no problem for most elements of
`default-frame-alist' or when setting the default font.  The only real
offender is that of your init file - namely setting the default height.

A trivial scenario for Emacs 24.3 on Windows (I didn't try with that
version on Lucid/Motif but I suppose it's similar) is with emacs -Q:

(setq default-frame-alist '((height . 50)))

C-x 5 2

(set-frame-parameter nil 'height 50)

This changes the height of the new frame although it apparently is
already 50 lines high.  Such behavior constitutes a bug IMHO.  This
could be fixed but is certainly not trivial enough for inclusion in
24.4.

There are a few more arguments to count differently on Lucid/Motif/No
toolkit/Windows:

(1) When the window manager asks us to resize a frame, we do not
     subtract the toolbar height.  That is, the height of the toolbar is
     included in the frame's text height afterwards, defeating our
     illusion that it's counted separately.  This means an even less
     trivial fix than the one mentioned above.

(2) The real height of the toolbar is with tool_bar_height which might
     not fit the one we assume (in x_figure_window_size) anyway.  One
     more non-trivial fix since tool_bar_height is not available
     initially but only after the display engine handled it.  But the
     display engine wants the initial height of the frame so we have a
     chicken-and-egg problem here.

(3) Lucid/Motif/No toolkit/Windows can wrap the toolbar (something Gtk
     doesn't).  The display engine does this by stealing the necessary
     height from the editing area - that is, the root window - and
     autonomously updating the `tool-bar-lines' frame parameter.  This
     complicates subsequent frame resizing since we don't know a priori
     whether the toolbar will wrap again.

So while I agree with you that menu and tool bar should not be
considered content, I see no easy way to work around this assumption on
the systems in question.  Suggestions welcome.

martin





  parent reply	other threads:[~2014-01-16 10:03 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 13:08 bug#16013: 24.3.50; Rows in height is interpreted as pixels Jan Djärv
2013-11-30 15:00 ` martin rudalics
2013-11-30 18:52   ` Jan Djärv
2013-12-01  9:44     ` martin rudalics
2013-12-01 10:01       ` Jan Djärv
2013-12-01 11:24         ` martin rudalics
2013-12-01 12:02           ` Jan Djärv
2013-12-02 18:15             ` martin rudalics
2013-12-02 22:03               ` Stephen Berman
2013-12-03  7:56                 ` martin rudalics
2013-12-03  9:13                   ` Stephen Berman
2013-12-03 18:34                     ` martin rudalics
2013-12-03 20:02                       ` Stephen Berman
2013-12-03  7:53               ` Jan Djärv
2013-12-03  7:58                 ` martin rudalics
2013-12-03 16:30                   ` Jan Djärv
2013-12-03 18:34                     ` martin rudalics
2013-12-03 19:30                       ` Jan Djärv
2013-12-03 19:45                         ` Jan Djärv
2013-12-04 18:06                           ` martin rudalics
2013-12-07 17:53                             ` Jan Djärv
2013-12-07 18:09                               ` martin rudalics
2013-12-09 18:26                               ` martin rudalics
2014-01-11 14:01                           ` martin rudalics
2014-01-11 17:46                             ` Jan Djärv
2014-01-12  9:54                               ` martin rudalics
2014-01-12 11:13                                 ` Jan Djärv
2014-01-12 11:46                                   ` martin rudalics
2014-01-12 20:25                                   ` Stefan Monnier
2014-01-12 22:21                                     ` Jan Djärv
2014-01-14 17:30                                   ` Jan Djärv
2014-01-14 18:10                                     ` martin rudalics
2014-01-16 10:03                                   ` martin rudalics [this message]
2014-01-16 10:14                                     ` martin rudalics
2014-01-18 11:30                                     ` Jan Djärv
2014-01-18 12:07                                       ` martin rudalics
2014-01-29 10:14                                       ` martin rudalics
2020-09-09 13:07                                         ` Lars Ingebrigtsen
2020-09-09 14:46                                           ` Eli Zaretskii
2020-09-10 12:40                                             ` Lars Ingebrigtsen
2013-12-04 18:06                         ` martin rudalics

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=52D7AE74.70302@gmx.at \
    --to=rudalics@gmx.at \
    --cc=16013@debbugs.gnu.org \
    --cc=jan.h.d@swipnet.se \
    /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).