Subject: Re: bug#18912: 24.4; mode-line corruption on graphical frames in dual-headed display

From: Eli Zaretskii <[email-masked]>
Date: Sat, 01 Nov 2014 15:03:12 +0200

> Date: Sat, 01 Nov 2014 10:54:03 -0200
> From: Bruno Félix Rezende Ribeiro <[email-masked]>
> CC: [email-masked]
> 
> For this test Emacs was started with the option '-Q' and in both
> configurations the frame was put by the window manager in the same area
> of the VGA1 output, with unchanged relative geometry:
> 
>   xwininfo (common to both configurations):
>     Absolute upper-left X:  520
>     Absolute upper-left Y:  23
>     Relative upper-left X:  4
>     Relative upper-left Y:  23
>     Width: 756
>     Height: 697
>     Depth: 24
>     Border width: 0
> 
> Good configuration (only VGA1 enabled):
> 
>   xwininfo:
>     Corners:  +520+23  -4+23  -4-0  +520-0
>     -geometry 80x37-0+0
> 
>   (window-height) => 34
>   (window-pixel-height) => 612
> 
> Bad configuration (both VGA1 and LVDS1 enabled):
> 
>   xwininfo:
>     Corners:  +520+23  -1028+23  -1028-0  +520-0
>     -geometry 80x37+516+0
> 
>   (window-height) ==> 34
>   (window-pixel-height) ==> 613

Thanks.

I don't see anything strange here, the 1-pixel difference shouldn't
have caused what you see.

Martin, any suggestions how to dig into this further?

> Interesting enough, '(window-pixel-height)' returns different values for
> both configurations under the "same" circumstances.  Furthermore, in
> both configurations '(window-height)' returns one line more than what
> was actually shown.  Therefore, both expressions seem to suggest an "off
> by one" bug.

I see no bug here: both functions return the height of the window
including the mode line, so the value sounds correct if you have 33
lines of text in that window.