bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19482: Changing to big font cause display problem


From: Jan D.
Subject: bug#19482: Changing to big font cause display problem
Date: Fri, 27 Feb 2015 18:52:49 +0100

> 27 feb 2015 kl. 09:30 skrev martin rudalics <rudalics@gmx.at>:
> 
> > I redid the whole INNER_TO_OUTER thing, and now handle all sides.
> > The macros INNER_TO_OUTER are removed.
> 
> Thanks.  I'm a bit lost currently because there seem to be problems
> here, at least with my GTK+3 build on the Xfce desktop.  I've tried to
> debug x_real_pos_and_offsets with emacs -Q but still am not able to find
> out what's wrong.  Maybe you can help with the following two issues.
> 
> (1) `x-frame-geometry' reports an external border width of zero for a
>    normal, non-maximized frame.  That's clearly wrong, the width is 5
>    pixels.  I have no idea how to track down what XGetWindowAttributes
>    retrieves here.

As I said in another mail, this is probably the window manager decorations, not 
a window border.  5 pixels is a large window border, but a reasonable window 
manager decoration.
However, I added the window manager window border to the calculations, but I 
suspect it is 0 all the time.
In theory it could be something else.

> 
> (2) `x-frame-geometry' reports a title height of 5.  This is wrong - the
>    title height is 20 pixels.  I don't yet understand how
>    x_real_pos_and_offsets works but I strongly suppose that
> 
>      if (top_offset_y) *top_offset_y = -outer_x;
> 
>    should be
> 
>      if (top_offset_y) *top_offset_y = -outer_y;
> 
>    at least.
> 

Typo, fixed now.

> Also, these two assignments
> 
>  outer_width = FRAME_PIXEL_WIDTH (f) + 2 * border + right_off + left_off;
>  outer_height = FRAME_PIXEL_HEIGHT (f) + 2 * border + top_off + bottom_off;
> 
> should _not_ use FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH because that
> would mean that I counter-check our calculations of frame sizes from
> these calculations.  What we should use here are the 'width' and 'height'
> attributes as returned by XWindowAttributes.

Indeed.

> 
> I haven't checked yet but do we conceptually assume that
> 
> FRAME_PIXEL_WIDTH (f) == atts.width
> FRAME_PIXEL_HEIGHT (f) == atts.height
> 
> Or does something additionally come into play here?

attts.height contains the external menu bar and tool bar, but PIXEL_HEIGHT does 
not.  I did not think that one through.

        Jan D.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]