Allow saving the session gvdb file in the background, with as little
overhead in the main thread as possible. We still need to serialize
all created/deserialized MetaSessionState to a GVDB hashtable there,
in order to avoid these being poked from the async task thread.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
The xdg_session_manager_v1 global interface is the generator
of xdg_session_v1 objects for clients. These will notify of an
unique ID that can be used for future instantiations.
Once a xdg_session_v1 object is obtained, toplevels can be added
to be managed by it, and clients may get a hint about whether the
toplevel was restored to a saved state.
Changes by Carlos Garnacho: Integrate with MetaSessionManager core
object. Flesh out event emission of xdg_session_v1 and
xdg_toplevel_session_v1 objects, handle sessions being
replaced/deleted.
Changes by Sebastian Wick:
* make lifetimes of xdg_sessions entirely determined by the wayland and
handle its destruction via the signal
* fix session destruction vs deletion
* do not drop refcount of replaced session state temporarily to make
sure the replacing session keeps the state
* disconnect signals of destroyed and replaced sessions
* disconnect window-unmanaging signal handler for
MetaWaylandXdgToplevelSession
* call wl_resource_destroy in xdg_toplevel_session_remove to make it a
destructor
* handle session being destroyed before topevel-sessions
* handle the toplevel going away before the topevel-sessions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
This object is a windowing-specific implementation of MetaSessionState,
allowing to save window state for toplevel surfaces of a Wayland client
using the xdg_session_management_v1 protocol.
This object is detached from windowing logic itself, and will be
integrated in later commits.
Changes from Carlos Garnacho: Integrate state serialization with
MetaSessionState and MetaSessionManager.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
Make this core object own the MetaSessionManager, for the window management
code to access.
At this level, we will be able to integrate with systemd notification
system, and use systemd fdstore to keep the mapped memory warm for
us for the case of soft reboot. This is at the moment not implemented
here.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
This core object will be the manager of "client sessions", allowing
the windowing-specific paths to generate MetaSessionState objects to
track their clients.
This object is unused at the moment, and will be integrated in later
commits.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
This is an abstract base class to implement a "client session",
carrying the accounting of the windows, and allowing to serialize/read
their state into a Gvdb table.
Since different windowing backends may require slightly different
data to be saved for each window, this is meant to have windowing-specific
implementations.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
A nick property is a bit similar to the nick of a GObject property, in
that it's a shorter version of the name. It's intended to be used to
store state on the file system, where the state depends on the desktop
environment being used. E.g. gnome-shell sets the name "GNOME Shell",
which is, if no nick is explicitly set, transformed into the nick
"gnome-shell", which will be used for file paths.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
Preparation for next commit, which may merge multiple KMS updates with
sync_fds for modesets. Waiting for all sync_fds to signal before
processing the merged KMS update would be rather involved, for now just
leave implicit sync enabled for it. We're still relying on implicit sync
for modesets in general anyway.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
Now that we copy this into a temporary XDG_DATA_HOME, we don't need
to have it duplicated in the source tree as well.
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
Previously these tests tried to write to /usr when run as an
installed-test, which happens to work on Gitlab-CI because we're running
as root inside a container, but will not work when running in a more
realistic scenario as an unprivileged user (which is how Debian's
autopkgtest framework runs this test suite).
This also avoids leaving non-package-manager-managed detritus in /usr.
In color-management-tests, we can just delete the code that sets
XDG_DATA_HOME.
In color-management-profile-conflict-test, we also need to copy
the conflicting vx239-calibrated.icc into the temporary XDG_DATA_HOME
to get onto the code path that this test is intended to exercise.
Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/3658
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>