Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Wayland won't allow window size/position to be remembered between sessions

It's not on the program itself to restore its position, but on the compositor, who has every right and control to do just that. AFAIK it does work in plasma Wayland.



That sounds great, but I don't fully agree... IMO a compositor should be able to provide a data structure (unchangeable, mostly or fully opaque) that the app can save/restore across sessions.


I don't get how that would work.


You'd ask for your window positioning data on close and restore it on open.


But then what's the point, what do you do with it that the compositor can't?

Then instead have stable window IDs so the compositor can do its job properly - there is absolutely no need to self-position and outside of certain privileged apps I absolutely don't want random programs to move their windows around.


Stable window IDs? Are you gonna use the document path and the panel number or something?


I wasn't aware of this proposal, but I pretty much nailed it and though of the same thing: https://news.ycombinator.com/item?id=49836487


That's the problem. The compositor can't reliably distinguish windows, and it definitely doesn't know when the data should be deleted in case the same window never opens again.


The session restore protocol requires the client to tag its windows with a string. See https://wayland.app/protocols/wayland-protocols/18#xdg_sessi... for details.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: