xx_session_management_v1 ↗
Copyright
Copyright 2018 Mike Blumenkrantz Copyright 2018 Samsung Electronics Co., Ltd Copyright 2018 Red Hat Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- xx_session_manager_v1 — manage sessions for applications
- xx_session_v1 — A session for an application
- xx_toplevel_session_v1
Protocol for managing application sessions
This description provides a high-level overview of the interplay between the interfaces defined this protocol. For details, see the protocol specification.
The xx_session_manager protocol declares interfaces necessary to allow clients to restore toplevel state from previous executions. The xx_session_manager_v1.get_session request can be used to obtain a xx_session_v1 resource representing the state of a set of toplevels.
Clients may obtain the session string to use in future calls through the xx_session_v1.created event. Compositors will use this string as an identifiable token for future runs, possibly storing data about the related toplevels in persistent storage.
Toplevels are managed through the xx_session_v1.add_toplevel and xx_session_toplevel_v1.remove pair of requests. Clients will explicitly request a toplevel to be restored according to prior state through the xx_session_v1.restore_toplevel request before the toplevel is mapped.
Warning! The protocol described in this file is currently in the experimental phase. Backwards incompatible major versions of the protocol are to be expected. Exposing this protocol without an opt-in mechanism is discouraged.
xx_session_management_v1
xx_session_manager_v1
- error
- reason — reason for getting a session
- destroy — Destroy this object
- get_session — create or restore a session
manage sessions for applications
The xx_session_manager interface defines base requests for creating and managing a session for an application. Sessions persist across application and compositor restarts unless explicitly destroyed. A session is created for the purpose of maintaining an application's xdg_toplevel surfaces across compositor or application restarts. The compositor should remember as many states as possible for surfaces in a given session, but there is no requirement for which states must be remembered.
xx_session_management_v1
xx_session_v1
- error
- destroy — Destroy the session
- remove — Remove the session
- add_toplevel — add a new surface to the session
- restore_toplevel — restore a surface state
- created — newly-created session id
- restored — the session has been restored
- replaced — the session has been restored
A session for an application
A xx_session_v1 object represents a session for an application. While the object exists, all surfaces which have been added to the session will have states stored by the compositor which can be reapplied at a later time. Two sessions cannot exist for the same identifier string.
States for surfaces added to a session are automatically updated by the compositor when they are changed.
Surfaces which have been added to a session are automatically removed from the session if xdg_toplevel.destroy is called for the surface.
xx_session_management_v1
xx_toplevel_session_v1
- destroy — Destroy the object
- remove — remove a surface from the session
- restored — a toplevel's session has been restored