Subject: bug#62535: 29.0.60; Wrong left, top values stored in .emacs.desktop file

From: Eli Zaretskii <[email-masked]>
Date: Thu, 30 Mar 2023 13:42:49 +0300

[Please use Reply All to reply, so that the bug tracker is CC'ed.]

> Date: Thu, 30 Mar 2023 12:26:47 +0200
> From: Claudio Grondi <[email-masked]>
> 
> 
> Have tested it with:
> 
> GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, 
> cairo version 1.16.0)
> 
> GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
> cairo version 1.16.0)
> 
> getting the same behavior.
> 
> 
> Why do you think it has something to do with WM?

Because it never happens to me here, and what other factor can explain
this?

> (you mean GNOME Window Manager? What is WM?

Yes, the Window Manager.

> The position of Emacs on the screen changes from restart to restart in 
> the .emacs.desktop file. Reading the position from the .desktop file 
> should give the value of the own position and if not changed is should 
> stay the same, doesn't it? Does Emacs 'ask the system' on exit for the 
> own position and update the .desktop file with it?

Positioning of frames is a function of the WM.  Emacs asks the WM to
position its frames, but the actual positioning is not up to us, at
least not with all the WMs out there.

> You mean if I run it on another version of Linux Mint Cinnamon it could 
> change? I'm using 21, but have still also 18.4 available.

It's worth trying.

Perhaps also try a build with another toolkit (like Lucid, not GTK),
it could also matter.  Although I thought this was supposed to be
solved in Emacs 29.