Wayland Session restore with a window placed into a specific tile

I am happy with session restore and using the ‘configure special window and application settings’ to place things where I left them. I am aware there is still wayland protocol work in progress around this area. Does anyone know if in the future it will be possible to place a window into a specific tile on restore ?

i don’t think anyone knows the answer to that question, but i’m sure many would agree on what the answer should be….

yes.

I don’t remember seeing that in the initial implementation on the KWin side but that might have been before most of the recent tiling work.

The advantage of the new approach taken by Wayland is that the compositor (window manager) is responsible for saving window related information, e.g. size/position, screen, and so on.

So a window manager with tiling can also save and restore related information if it chooses to.

We will need to await the implementation for the finalized version of the respective protocol to see which bits of its internal state KWin will decide to save.

1 Like

Is there any update on the likely status of “proper” session restoration in Wayland?

The present status seems to be (based on some very quick tests)

  1. Programs and windows are (mostly) restored even on switching between X11 & Wayland (I did lose one of 2 Dolphin windows in the W→X direction).
  2. However all of the windows are dumped into the current desktop (and in the case of multiple monitors one monitor).

The second item is clearly highly undesirable if handing a desktop with 50-70 windows on 10 virtual desktops or workspaces.

Mostly implemented but currently “hidden” behind configuration/flags.

See Going all-in on a Wayland future - #72 by krake for some of those

What the current thing does is affectionately called “real fake session restore” - it’s sort of a hack that just (attempts to) start the applications that were running last time. It doesn’t really do session restore as you’d usually imagine it.

Firefox will restore all its windows, because it’s one firefox process managing multiple windows, so when you restart it, it’ll reopen all of them. On the other hand, Dolphin is a single window per process, and when you real-fake-session-restore it, you just get one process, so one window.

Real session restore will also allow restoring window positions, window virtual desktops, and at some point (maybe immediately) likely also tiling state, activities, etc. The Wayland protocol for this is in the final stages, and already being implemented by some compositors and applications, but is not yet well-supported by toolkits. AIUI, support for this is supposed to land in Qt 6.11, which should make it relatively straightforward to add support for this to all KDE apps. Support on the app side is unfortunately required, so that compositor and app can agree which window is which and what should be done with it (e.g. is a particular window one that should be restored, or a new one?)

1 Like

This looks like a classic case of having a more sophisticated protocol that allows bizarre corner cases to be handled at the price of making it much more complicated to do the simple things.

I really hope that this can get fixed before the X11 session is dropped, otherwise I fear a train wreck that will make KDE-4 seem like a minor blip.

Here it is a case of having an reliable solution instead of having various degrees of hacks on both server and client side.

I am looking forward to having windows restored to the correct screen, virtual desktop, activity, position and state instead of various partial combinations of those.

1 Like