Subject: Re: bug#19482: Changing to big font cause display problem

From: martin rudalics <[email-masked]>
Date: Sun, 22 Feb 2015 18:10:15 +0100

> I added an implementation for NS.

Thanks a lot.

 > When looking at the X version, this does not make sense (except from the redundant parantesis):

The parenthesis is here for indentation purposes only.

 >    outer_height = (FRAME_PIXEL_HEIGHT (f)
 > 		  + FRAME_OUTER_TO_INNER_DIFF_Y (f)
 > 		  + FRAME_OUTER_TO_INNER_DIFF_X (f));
 >
 > What is the connection between height and DIFF_X?
 > It should probably be
 >
 >    outer_height = FRAME_PIXEL_HEIGHT (f)
 > 		  + 2 * FRAME_OUTER_TO_INNER_DIFF_Y (f);

IIUC FRAME_OUTER_TO_INNER_DIFF_Y is the height of title bar, tool bar
plus that of one decoration while FRAME_OUTER_TO_INNER_DIFF_X is just
the "width" of the decoration which I assumed equal on all other three
sides but the top one.  I probably should have written

   outer_height = (FRAME_PIXEL_HEIGHT (f)
		  + FRAME_OUTER_TO_INNER_DIFF_Y (f)
		  + border);

instead.  Either way I can't add FRAME_OUTER_TO_INNER_DIFF_Y twice.

However, this version works only because FRAME_OUTER_TO_INNER_DIFF_X
apparently never counts a tool bar on the left or the right.  And at
least here a maximized frame shows decorations only on two orthogonal
sides so the above is certainly not always correct.  Do you have any
better ideas?

martin