Previous code could create distinct WorkspaceState / LayoutState instances but share the underlying self._view_states / self._workspace_states dicts, which sounds buggy. E.g. a sequence like this:
would result in both ws_copy and ws_state losing same view key.
This PR does deep copying by giving the copies their own dicts.
BARELY TESTED: based on reading the code I believe this will be more correct, but I don't know any concrete scenario where I saw the WM misbehave and is now better.
All I can say is I've run with the new code for several minutes on 2 outputs, moved some windows around, and nothing obvious went wrong :-)
Previous code could create distinct WorkspaceState / LayoutState instances but share the underlying
self._view_states
/self._workspace_states
dicts, which sounds buggy. E.g. a sequence like this:would result in both ws_copy and ws_state losing same view key.
This PR does deep copying by giving the copies their own dicts.
BARELY TESTED: based on reading the code I believe this will be more correct, but I don't know any concrete scenario where I saw the WM misbehave and is now better.
All I can say is I've run with the new code for several minutes on 2 outputs, moved some windows around, and nothing obvious went wrong :-)