cuttle icon indicating copy to clipboard operation
cuttle copied to clipboard

Linux window position saving

Open oakmac opened this issue 10 years ago • 8 comments

I'm noticing a bug on Linux (Xubuntu 14.04) where the window position adjusts between application closing / opening.

Here is window.json opening and closing 4 times:

{"maximized":false,"position":[258,136],"size":[1000,850]}
{"maximized":false,"position":[259,160],"size":[1000,850]}
{"maximized":false,"position":[260,184],"size":[1000,850]}
{"maximized":false,"position":[261,208],"size":[1000,850]}

Every time the window is closed it adjusts x by x + 1 and y by y + 24.

Not seeing this behavior on Windows. Wonder if this is an xfce thing, an atom-shell thing, all Linux? Who knows.

Might also have to do with the way we're closing the window right now using destroy() instead of following normal window close lifecycle.

oakmac avatar Jan 14 '15 08:01 oakmac

Would be great if someone could reproduce this on Linux using a different window manager.

oakmac avatar Jan 17 '15 21:01 oakmac

Happening on ubuntu too. Eventually stops moving on y coordinates.

comamitc avatar Jan 19 '15 03:01 comamitc

Is it adjusting in the same way? ie: x+1, y+24? Which version of Ubuntu? Window manager? etc You can check this in the window.json file located in ~/.config/Cuttle/window.json It should be updated everytime the application is closed.

oakmac avatar Jan 19 '15 03:01 oakmac

no x movement and different y movement on ubuntu 14.04; window manager is Unity.

comamitc@ubuntu:~/.config/Cuttle$ cat window.json 
{"maximized":false,"position":[253,80],"size":[1000,850]}
comamitc@ubuntu:~/.config/Cuttle$ cat window.json 
{"maximized":false,"position":[253,108],"size":[1000,850]}

comamitc avatar Jan 19 '15 03:01 comamitc

Can we see a few more iterations of that just to confirm a pattern?

oakmac avatar Jan 19 '15 03:01 oakmac

comamitc@ubuntu:~/.config/Cuttle$ cat window.json 
{"maximized":false,"position":[253,80],"size":[1000,850]}
comamitc@ubuntu:~/.config/Cuttle$ cat window.json 
{"maximized":false,"position":[253,108],"size":[1000,850]}
comamitc@ubuntu:~/.config/Cuttle$ cat window.json 
{"maximized":false,"position":[253,128],"size":[1000,850]}
comamitc@ubuntu:~/.config/Cuttle$ cat window.json 
{"maximized":false,"position":[253,128],"size":[1000,850]}

Appears to move to the bounds on the UI and then stops.

comamitc avatar Jan 19 '15 03:01 comamitc

I believe this might be worthy of an Atom-Shell bug. If they feel the need to escalate to the various UNIX window managers due to inconsistency, I believe the maintainers should be responsible for that.

comamitc avatar Jan 19 '15 03:01 comamitc

Yeah - this feels like an atom-shell (or deeper, chromium?) bug to me. I will open an issue there and see what they say.

oakmac avatar Jan 19 '15 03:01 oakmac