Using the latest GIT version of xfce4-session, it doesn't restore the last opened windows in the session correctly on the workspaces anymore when logging in. I do save my session on logout and xfce4-session restores all my windows from the last session, but it opens them all on the first workspace, not on the one they were running on logout. This has happened before.
Jérôme told me the “windows geometry is not restored” does this include window sizes as well? or is it just the workspaces that are “forgotten?”
Window sizes are restored properly. It's just the placement on the workspaces is broken. Also, the window positions of the restored windows are not correct but I think this is only a side effect because many windows are restored on the same workspace and xfwm4 tries to place them intelligent. Anyway, I'm not sure whether this is a side effect or part of the bug or another independent bug. So, for now, the workspace restoring should work in the first place, then we can check the other issue.
This will probably sound surprising... I have xfce4-session from git installed, I have also xfwm4 from git installed, and saving the session works fine. When I then log in, all the previous windows are restored as they were with their right position and workspaces. Next I re-logged out and in again and still didn't trigger any oddities. Before saving the session, I had an empty ~/.cache/sessions/ directory. After logging out I had three files (I tested with two apps).
A few notes on this. There is some code missing in xfwm4, we need to connect to the "save-state-extended" signal of the XfceSmCLient. But even after doing that, it does not work, the problem might be in XfceSmClient.
I think this is fixed, you need both libxfce4ui and xfwm4 master for this.
Tried it a bit, seems to work fine again.
Seems to work fine again. Thank you Nick and Jérôme for spending time to fix this.