Subject: Re: bug#25943: 21.5 Frame Display Difficulties

From: martin rudalics <[email-masked]>
Date: Thu, 23 Mar 2017 08:59:49 +0100

> I'll eventually push a "fix" to the repository but this
 > will certainly not become part of the Emacs 25 series.

I've pushed a fix to master now.  So if you can work with master please
update your copy and set, in your init file, the variable
`x-gtk-use-window-move' to t and see whether your problem one is fixed
now.

To everyone who sets negative frame positions in her programs or init
file: Please try loading the attached file frame-position.el, evaluate
it, call `frame-position-make' which will create twelve frames evenly
distributed among the corners of your screen and finally run the
function `frame-position-list' whose return value lists position and
size information about these frames.  Here this gets me a list like

((display-pixel-width . 1680)
  (display-pixel-height . 1050)
  (arg
   (p-left . 40)
   (p-top . 40)
   (left . 40)
   (top . 40)
   (width . 750)
   (height . 360))
   ...
(arg
   (p-left . -40)
   (p-top . -40)
   (left . 904)
   (top . 564)
   (width . 750)
   (height . 360)
   (r-left . -26)
   (r-top . -126))
   ...
  (fun
   (p-left . -40)
   (p-top . -40)
   (left . 890)
   (top . 564)
   (width . 750)
   (height . 360)
   (r-left . -40)
   (r-top . -126)))

The "arg" frames were produced by supplying sizes and positions via the
argument list of `make-frame'.  The "par" frames were produced by
calling `modify-frame-parameters' with the sizes and positions after the
frame was made and making the frame visible after that.  The "fun"
frames were produced by setting frame sizes and positions after the
frame was made and making the frame visible after that.

p-left stands for the programmed and r-left for the realized left
position.  p-top and r-top do that for the top position.  Ideally, these
values are the same, often they aren't.  Here, the difference between
the "arg" and the "fun" values is that the latter apparently already
counts in 14 pixels for the scroll bar.

Besides that, the values are still far from correct on GNU/Linux since
they do not account for the window manager decorations.  I would be
interested if people get results that differ from the examples I gave
above.

Thanks, martin