Re: [PATCH] unstable: add xdg-session-management protocol
On 2018/2月/26 08:58, Mike Blumenkrantz wrote: > for a variety of cases it's desirable to have a method for negotiating > the restoration of previously-used states for a client's windows. this > helps for e.g., a compositor/client crashing (definitely not due to > bugs) or a backgrounded client deciding to temporarily destroy its > surfaces in order to conserve resources What's the intended workflow for the background client? The protocol states that the session data should be removed on xdg_toplevel.destroy, which would not allow clients to reuse state after they gracefully exited, or "exited" partially (closing some windows, not the entire connection). > > this protocol adds a method for managing such negotiation and is loosely > based on the Enlightenment "session recovery" protocol which has been > implemented and functional for roughly two years > > some further reading: https://blogs.s-osg.org/recovery-journey-discovery/ > > Signed-off-by: Mike Blumenkrantz> Signed-off-by: Jonas Ådahl > --- > Makefile.am| 1 + > unstable/xdg-session-management/README | 4 + > .../xdg-session-management-unstable-v1.xml | 181 > + > 3 files changed, 186 insertions(+) > create mode 100644 unstable/xdg-session-management/README > create mode 100644 > unstable/xdg-session-management/xdg-session-management-unstable-v1.xml > > diff --git a/Makefile.am b/Makefile.am > index 4b9a901..2b75114 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -17,6 +17,7 @@ unstable_protocols = > \ > > unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml > \ > unstable/xdg-output/xdg-output-unstable-v1.xml > \ > unstable/input-timestamps/input-timestamps-unstable-v1.xml \ > + unstable/xdg-session-management/xdg-session-management-unstable-v1.xml > \ > $(NULL) > > stable_protocols = > \ > diff --git a/unstable/xdg-session-management/README > b/unstable/xdg-session-management/README > new file mode 100644 > index 000..7bff401 > --- /dev/null > +++ b/unstable/xdg-session-management/README > @@ -0,0 +1,4 @@ > +xdg session management protocol > + > +Maintainers: > +Mike Blumenkrantz > diff --git > a/unstable/xdg-session-management/xdg-session-management-unstable-v1.xml > b/unstable/xdg-session-management/xdg-session-management-unstable-v1.xml > new file mode 100644 > index 000..0c36c16 > --- /dev/null > +++ b/unstable/xdg-session-management/xdg-session-management-unstable-v1.xml > @@ -0,0 +1,181 @@ > + > + > + > +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. > + > + > +Warning! The protocol described in this file is experimental and backward > +incompatible changes may be made. Backward compatible changes may be > added > +together with the corresponding interface version bump. Backward > +incompatible changes are done by bumping the version number in the > protocol > +and interface names and resetting the interface version. Once the > protocol > +is to be declared stable, the 'z' prefix and the version number in the > +protocol and interface names are removed and the interface version > number is > +reset. > + > + > + > + The xdg_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 > +
[PATCH] unstable: add xdg-session-management protocol
for a variety of cases it's desirable to have a method for negotiating the restoration of previously-used states for a client's windows. this helps for e.g., a compositor/client crashing (definitely not due to bugs) or a backgrounded client deciding to temporarily destroy its surfaces in order to conserve resources this protocol adds a method for managing such negotiation and is loosely based on the Enlightenment "session recovery" protocol which has been implemented and functional for roughly two years some further reading: https://blogs.s-osg.org/recovery-journey-discovery/ Signed-off-by: Mike BlumenkrantzSigned-off-by: Jonas Ådahl --- Makefile.am| 1 + unstable/xdg-session-management/README | 4 + .../xdg-session-management-unstable-v1.xml | 181 + 3 files changed, 186 insertions(+) create mode 100644 unstable/xdg-session-management/README create mode 100644 unstable/xdg-session-management/xdg-session-management-unstable-v1.xml diff --git a/Makefile.am b/Makefile.am index 4b9a901..2b75114 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,6 +17,7 @@ unstable_protocols = \ unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \ unstable/xdg-output/xdg-output-unstable-v1.xml \ unstable/input-timestamps/input-timestamps-unstable-v1.xml \ + unstable/xdg-session-management/xdg-session-management-unstable-v1.xml \ $(NULL) stable_protocols = \ diff --git a/unstable/xdg-session-management/README b/unstable/xdg-session-management/README new file mode 100644 index 000..7bff401 --- /dev/null +++ b/unstable/xdg-session-management/README @@ -0,0 +1,4 @@ +xdg session management protocol + +Maintainers: +Mike Blumenkrantz diff --git a/unstable/xdg-session-management/xdg-session-management-unstable-v1.xml b/unstable/xdg-session-management/xdg-session-management-unstable-v1.xml new file mode 100644 index 000..0c36c16 --- /dev/null +++ b/unstable/xdg-session-management/xdg-session-management-unstable-v1.xml @@ -0,0 +1,181 @@ + + + +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. + + +Warning! The protocol described in this file is experimental and backward +incompatible changes may be made. Backward compatible changes may be added +together with the corresponding interface version bump. Backward +incompatible changes are done by bumping the version number in the protocol +and interface names and resetting the interface version. Once the protocol +is to be declared stable, the 'z' prefix and the version number in the +protocol and interface names are removed and the interface version number is +reset. + + + + The xdg_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. + + + + This has no effect other than to destroy the xdg_session_manager object. + + + + +Create a session object corresponding to the given session +identifier string. While the session object exists, the session is +