Skip to content

x11/window: Mark restored workspace as “set”

Olivier Fourdan requested to merge ofourdan/mutter:my_work into master

When a window's workspace is not NULL, on_all_workspace should be FALSE. Similarly, when on_all_workspace is TRUE, the window workspace should be NULL.

This is an assumption in multiple places in the code, including when setting the workspace state, the window is either added or removed from all workspaces only if the window's workspace is NULL.

This rule is initially enforced at creation in _meta_window_shared_new() when a initial workspace is set. However, when the initial workspace is set from the session info, the initial workspace is not marked as “set” which leads to an assertion failure when unmanaging windows, because the window is not removed from all the workspaces.

When applying the session info to a window, mark the workspace as “set”.

#4 (closed)

Closes: #4 (closed)

Merge request reports