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

From: Claudio Grondi <[email-masked]>
Date: Thu, 30 Mar 2023 20:11:12 +0200

Installed Emacs 27.1 lucid version. It hasn't shown the described 
problem and I have had the impression that the graphics comes up faster.

Then I have compiled Emacs 29.0.60 with lucid instead of gtk and was not 
able to reproduce the bug either.

I think I will stay with the lucid version.
I have been biased towards gtk because of python tkinter gui toolkit I 
have been already familiar with.

The drift left and up ... seem to happen during the initialization 
process of Emacs.
I am not 100% sure, but I have had the impression that there was an 
extremely short period of time where the window was at the right place 
and then moved a bit. Finally on exit Emacs saves then the changed 
position. In other words the problem appears to be repositioning the 
window while processing the .desktop and/or the other the initialization 
files.

If you can't reproduce this behavior from the .emacs.desktop file ... 
the reason for it will remain maybe a strange mystery (until it pops up 
again in another context in future Emacs versions).

On 3/30/23 12:42, Eli Zaretskii wrote:
> [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.