all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
To: martin rudalics <rudalics@gmx.at>
Cc: 19482@debbugs.gnu.org
Subject: bug#19482: Changing to big font cause display problem
Date: Wed, 25 Feb 2015 21:22:48 +0100	[thread overview]
Message-ID: <0EC97186-BC13-4ABB-A86C-B1AA5287748B@swipnet.se> (raw)
In-Reply-To: <54EE1BE2.2060008@gmx.at>

Hi.

> 25 feb 2015 kl. 20:00 skrev martin rudalics <rudalics@gmx.at>:
> 
> >>   So in
> >>
> >> #define FRAME_OUTER_TO_INNER_DIFF_Y(f)          \
> >>      ((f)->output_data.x->y_pixels_outer_diff   \
> >>       + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
> >>
> >> we calculate the height difference of the Emacs outer window and the
> >> Emacs inner window where y_pixels_outer_diff in this context stands for
> >> the external border only.  Correct?
> >
> > No.  As currently defined, this is the difference at the top, so it
> > includes the title bar if any. Also, I said the Gnome 3 window manager
> > puts a 10 pixel area for shading purposes.  y_pixels_outer_diff
> > contains these 10 pixels + borders.  Window managers may put extra
> > decorations around a window, those are also included.  Only if the
> > window manager adds nothing to the sides, and there is no title bar
> > does y_pixels_outer_diff represent the border only.
> 
> OK.  This is what I assumed initially.  So this macro specifies the
> distance of the top of the Emacs inner window from the top of the window
> manager window.

Yes, but it is buggy as it does not take into accout the case of the tool bar at the bottom.

> 
> >
> >>   And this
> >>
> >>   /* These many pixels are the difference between the outer window (i.e. the
> >>      left and top of the window manager decoration) and FRAME_X_WINDOW.  */
> >>   int x_pixels_diff, y_pixels_diff;
> >>
> >> is misleading because "outer window" here is not the same as
> >> "FRAME_OUTER_WINDOW".  So I'm still not sure: What do
> >> y_pixels_outer_diff and y_pixels_diff typically stand for?
> >
> 
> > y_pixels_outer_diff is typically the title bar height + the external
> > border.  Nowdays there are few window managers that add decorations at
> > the top except the title bar, but if they did, it would be added here
> > (like the 10 pixel shading area).
> 
> So this is the distance of the top of the Emacs outer window from the
> top of the window manager window plus the external border.

Yes.

> 
> > y_pixels_diff is the offsets to the FRAME_X_WINDOW, not the
> > FRAME_OUTER_WINDOW.  For the case with external menu bar and external
> > tool bar at the top, y_pixels_diff is y_pixels_outer_diff + menu bar
> > height + tool bar height. If there are no tool bar or menu bar, then
> > they become the same.
> 
> And how does this differ from FRAME_OUTER_TO_INNER_DIFF_Y?

I don't know, I think they would be the same.

> 
> > I do include nested windows in the picture above.  The inner window is nested inside the outer window, which in turn is nested inside the window manager window.
> >
> > It is a containment relationship.  Ithe inner window is contained inside the outer window.
> > The outer window is contained inside the window manager window.
> >
> >>   Now where do the external borders go in this drawing?  I
> >> considered them part of the window manager window.  You apparently
> >> consider them part of the Emacs outer window.  Right?
> >
> > In X speak they are part of the outer window.  X handles external
> > borders separate from windows, so you specify both width/height and
> > border width when you create a window.  They are part of the outer
> > window, because if you kill the window manager and run without any
> > window manager, the borders are still there.
> 
> That's confusing.  OT1H they are part of the outer window and OTOH they
> are drawn around the window manager window.

No, the border is drawn around the outer window.

>  This makes nesting
> impossible.  That is, the Emacs outer window cannot be contained in the
> windows manager window

The only purpose for a window manager windon is to contain other applications top level windows.

> 
> >> But it's still where the internal borders are?
> >
> > They are in the inner window.
> 
> But we don't count them in `frame-text-height'.

Ok.  That makes sense though, the inner border is not text.

> 
> > Then how do you allow for spanning between monitors?
> 
> You mean someone who increases the default font would expect the frame
> to span a second monitor.  That person would have to set the option in a
> way that it doesn't constrain the frame's size.

But if you want to span when the second monitor is connected, but constrain when there is only one?
There are so many corner cases here.  There will be bug reports if Emacs tries to constrain stuff.
The only one that has the full picture is the window manager, so it is its job, not Emacs.

	Jan D.






  reply	other threads:[~2015-02-25 20:22 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01 15:21 bug#19482: Changing to big font cause display problem 张海君
2015-02-13 18:28 ` martin rudalics
2015-02-18 11:19   ` 张海君
2015-02-18 14:05     ` martin rudalics
2015-02-19  1:59       ` 张海君
2015-02-19  6:57         ` martin rudalics
2015-02-20 10:23           ` 张海君
2015-02-20 18:21             ` martin rudalics
2015-02-21  1:33               ` 张海君
2015-02-21 11:44                 ` martin rudalics
2015-02-22  2:57                   ` 张海君
2015-02-22 10:00                     ` martin rudalics
2015-02-22 10:54                       ` 张海君
2015-02-22 11:32                         ` martin rudalics
2015-02-22 12:27                           ` 张海君
2015-02-22 17:09                             ` martin rudalics
2015-02-23  2:11                               ` 张海君
2015-02-22 16:27                         ` Jan D.
2015-02-22 17:10                           ` martin rudalics
2015-02-22 17:43                             ` Jan D.
2015-02-22 18:52                               ` martin rudalics
2015-02-23  6:22                                 ` Jan D.
2015-02-24 19:09                                   ` Jan D.
2015-02-25  7:34                                     ` martin rudalics
2015-02-25  9:20                                       ` Jan D.
2015-02-25 10:33                                         ` martin rudalics
2015-02-25 15:27                                           ` Jan D.
2015-02-25 17:33                                             ` martin rudalics
2015-02-25 18:25                                               ` Jan D.
2015-02-25 19:00                                                 ` martin rudalics
2015-02-25 20:22                                                   ` Jan D. [this message]
2015-02-27  8:30                                                     ` martin rudalics
2015-02-27 17:49                                                       ` Jan D.
2015-02-25 19:17                                                 ` Jan D.
2015-02-27  8:30                                                   ` martin rudalics
2015-02-27 17:52                                                     ` Jan D.
2015-02-27 19:49                                                       ` martin rudalics
2015-02-27 20:29                                                         ` Jan D.
2015-03-01 15:14                                                         ` martin rudalics
2015-03-01 16:18                                                           ` Jan D.
2015-03-10 14:36                                     ` 张海君
2015-03-10 18:47                                       ` martin rudalics
2015-03-12  5:14                                         ` Jan D.
2015-03-12 10:13                                           ` martin rudalics
2015-03-12 16:52                                             ` Eli Zaretskii
2015-03-12 18:21                                             ` Jan D.

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

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

  git send-email \
    --in-reply-to=0EC97186-BC13-4ABB-A86C-B1AA5287748B@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=19482@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.