Applications built on ltk had no way to come back where the user left them: the toolkit hardcoded `app_id = "ltk"` on every toplevel, never wrote anything to disk, and died on SIGTERM without a chance to save. This release gives the runtime the whole plumbing and asks each application only for the bytes worth keeping, in the spirit of Android's saved-instance state. The `App` trait gains three mandatory methods, deliberately without default bodies so every application states its position: `app_id()` (reverse-DNS, used for `xdg_toplevel.set_app_id`, the AccessKit application name and the state directory — the `app_id` element of the deprecated `window_config` tuple is now ignored and a one-time warning reports a mismatch), `save_state() -> Option<Vec<u8>>` and `restore_state(Vec<u8>)`. The bytes are opaque; the trait carries no serde bound. Their rustdoc is the contract: when the runtime saves, where the files live, when the bytes come back and when they do not, what must never go in them, and a worked serde_json example. The runtime persists under `$XDG_STATE_HOME/<app_id>/` (falling back to `~/.local/state`): `session.json` holds the compositor session id, a clean-exit marker and the writer's pid; `state.bin` holds the application bytes. Writes are atomic (temp file + rename, mode 0600, directory 0700) and best-effort. State is saved every 30 s when the bytes changed, once after the event loop exits (which covers `on_close_requested`, `requested_exit` and lost connections), and on SIGTERM/SIGINT — a calloop signal source, installed before any thread exists, now turns those into a clean exit of the loop instead of process death. `restore_state` runs synchronously in `try_run` before the window is created and before the first `view()`, and only when the process is relaunched as part of a session restore (`LTK_SESSION_RESTORE=1`, removed from the environment before the app can spawn children) or when the previous run left `clean_exit: false`; a plain launch starts fresh. A second concurrent instance detects the live pid and runs with persistence disabled rather than clobbering the first. The compositor side of geometry restore goes through `xdg-session-management-v1`. Neither wayland-protocols nor sctk ship generated code for it yet, so the XML is vendored under `protocols/` and `wayland-scanner` generates the client module in-tree (`src/protocol/`), resolving the crate names through sctk's reexports so the bindings stay on the crate instances sctk links. Before the first commit of a `ShellMode::Window` toplevel the runtime binds `xdg_session_manager_v1`, calls `get_session(reason, stored_id)` and `restore_toplevel(toplevel, "main")`; the three window-creation paths in `run.rs` are folded into one `make_window` helper so the attach always sits immediately before `commit()`. `created` persists the id, `replaced` destroys the objects and stops persisting. Compositors without the global lose only the geometry half. Layer-shell and session-lock surfaces skip the whole machinery. Every `App` implementor in the tree is updated: the twelve examples (`showcase`, `scroll` and `mini_shell` persist real state; the rest return `None`), both integration tests (`event_loop_flow` gains `save_restore_round_trip`), the in-source and markdown doctests, README, onboarding, cookbook (new recipe "Surviving relaunch: session state") and architecture docs, and the changelog. `src/session_state.rs` carries unit tests over a temporary state directory. `Makefile install` now copies `protocols/` into the cargo registry — without it downstream builds would fail inside the proc-macro — and `debian/copyright` covers the vendored XML. The trait change is breaking, hence 0.3.0. Also fixes the pre-existing `viewport_tests` module in `render/mod.rs`, which used `Length` without importing it and broke `cargo test`.
286 lines
13 KiB
Plaintext
286 lines
13 KiB
Plaintext
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
Upstream-Name: ltk
|
|
Upstream-Contact: Liberux Labs, S. L. <info@liberux.net>
|
|
Source: https://liberux.net
|
|
|
|
Files: *
|
|
Copyright: 2026 Liberux Labs, S. L. <info@liberux.net>
|
|
License: LGPL-2.1-only
|
|
|
|
Files: debian/*
|
|
Copyright: 2026 Liberux Labs, S. L. <info@liberux.net>
|
|
License: LGPL-2.1-only
|
|
|
|
Files: protocols/*
|
|
Copyright: 2018 Mike Blumenkrantz
|
|
2018 Samsung Electronics Co., Ltd
|
|
2018 Red Hat Inc.
|
|
License: MIT
|
|
Comment:
|
|
xdg-session-management-v1.xml, vendored verbatim from wayland-protocols
|
|
(staging) so the client bindings can be generated at build time.
|
|
|
|
Files: themes/default/branding/*
|
|
themes/default/icons/apps/*
|
|
themes/default/icons/app-default.svg
|
|
Copyright: 2026 Liberux Labs, S. L. <info@liberux.net>
|
|
License: LGPL-2.1-only
|
|
Comment:
|
|
Wallpapers, lockscreens, launcher logos (under
|
|
themes/default/branding/) and per-application icons (under
|
|
themes/default/icons/apps/, plus the `app-default.svg` fallback)
|
|
are original artwork by Liberux Labs, distributed under the same
|
|
LGPL-2.1-only terms as the rest of the toolkit. Raster variants
|
|
(`*.webp` under branding/{light,dark}/{wallpaper,lockscreen}/)
|
|
are pre-rendered from the canonical SVGs in the same directory
|
|
and inherit the same licence.
|
|
|
|
Files: themes/default/icons/catalogue/*
|
|
Copyright: 2024 Streamline (https://streamlinehq.com)
|
|
License: CC-BY-4.0
|
|
Comment:
|
|
Symbolic glyphs under themes/default/icons/catalogue/{filled,line}/
|
|
are sourced from Streamline's *Core Line Free* set, distributed
|
|
under Creative Commons Attribution 4.0 International. Some of the
|
|
SVG files have been modified from the upstream collection (typical
|
|
edits include viewBox normalisation, removal / normalisation of
|
|
inline fill / stroke so `theme::tint_symbolic` controls the final
|
|
colour at runtime, ID renames, and path simplification at small
|
|
chrome sizes); which files were touched and which were not is not
|
|
tracked per icon — treat any file in this directory as potentially
|
|
differing from the upstream release and fetch from upstream if a
|
|
pristine copy is required. This directory-wide declaration satisfies
|
|
CC BY 4.0 §3(a)(1)(B); the full text is in
|
|
themes/default/icons/catalogue/LICENSE.md. The runtime
|
|
`theme::tint_symbolic` pass is a separate transformation of the
|
|
rendered RGBA output and is not a modification of the on-disk SVGs.
|
|
Upstream collection: https://www.streamlinehq.com/icons/core-line-free
|
|
Attribution shorthand: "Icons by Streamline, CC BY 4.0".
|
|
|
|
Files: src/theme/fallback/Sora-Regular.otf
|
|
src/theme/fallback/Sora-LICENSE.txt
|
|
Copyright: 2019-2020 The Sora Project Authors
|
|
2020 Jonathan Barnbrook <jb@barnbrook.net>
|
|
2020 Julián Moncada <julian@moncada.work>
|
|
License: OFL-1.1
|
|
Comment:
|
|
Sora Regular is bundled as the last-resort font fallback used by
|
|
`Canvas::new` / `Canvas::new_gles` when no system font from the
|
|
candidate chain (`fonts-sora`, `fonts-liberation`, `fonts-dejavu`,
|
|
…) is installed. The full OFL 1.1 text is reproduced in the
|
|
sibling `Sora-LICENSE.txt`. Upstream:
|
|
https://github.com/sora-xor/sora-font
|
|
|
|
Files: themes/default/cursors/*
|
|
Copyright: 2002-2014 The GNOME Project and the Adwaita icon theme authors
|
|
License: CC-BY-SA-3.0 or LGPL-3, and CC-BY-SA-4.0
|
|
Comment:
|
|
Pointer cursors under themes/default/cursors/ are GNOME's *Adwaita*
|
|
cursor theme — the cursors GNOME Shell ships — bundled verbatim from
|
|
the adwaita-icon-theme distribution so the default ltk theme is
|
|
self-contained (it does not depend on adwaita-icon-theme being
|
|
installed). The files are in XCursor binary format, one per CSS cursor
|
|
name (default, text, pointer, *-resize, …) plus the customary X11 alias
|
|
symlinks (arrow → default, hand2 → pointer, …); the sibling
|
|
cursor.theme makes the tree a valid XCursor theme. They are unmodified
|
|
from upstream. A Wayland compositor draws them in response to
|
|
wp_cursor_shape_v1, so ltk applications get them without bundling their
|
|
own. Upstream offers the artwork under the disjunction in the License
|
|
field; redistributing under any one of the options satisfies the
|
|
licence. Attribution shorthand: "Cursors by the GNOME Project". The
|
|
full functional and licence notes live in
|
|
themes/default/cursors/README.md and themes/default/cursors/LICENSE.md.
|
|
Upstream: https://gitlab.gnome.org/GNOME/adwaita-icon-theme
|
|
|
|
License: LGPL-2.1-only
|
|
This library is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU Lesser General Public License as published by
|
|
the Free Software Foundation; version 2.1 of the License.
|
|
.
|
|
This library is distributed in the hope that it will be useful, but
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
|
|
General Public License for more details.
|
|
.
|
|
On Debian systems, the full text of the GNU Lesser General Public
|
|
License version 2.1 can be found in the file
|
|
`/usr/share/common-licenses/LGPL-2.1'.
|
|
|
|
License: OFL-1.1
|
|
-----------------------------------------------------------
|
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
-----------------------------------------------------------
|
|
.
|
|
PREAMBLE
|
|
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
development of collaborative font projects, to support the font creation
|
|
efforts of academic and linguistic communities, and to provide a free and
|
|
open framework in which fonts may be shared and improved in partnership
|
|
with others.
|
|
.
|
|
The OFL allows the licensed fonts to be used, studied, modified and
|
|
redistributed freely as long as they are not sold by themselves. The
|
|
fonts, including any derivative works, can be bundled, embedded,
|
|
redistributed and/or sold with any software provided that any reserved
|
|
names are not used by derivative works. The fonts and derivatives,
|
|
however, cannot be released under any other type of license. The
|
|
requirement for fonts to remain under this license does not apply
|
|
to any document created using the fonts or their derivatives.
|
|
.
|
|
DEFINITIONS
|
|
"Font Software" refers to the set of files released by the Copyright
|
|
Holder(s) under this license and clearly marked as such. This may
|
|
include source files, build scripts and documentation.
|
|
.
|
|
"Reserved Font Name" refers to any names specified as such after the
|
|
copyright statement(s).
|
|
.
|
|
"Original Version" refers to the collection of Font Software components as
|
|
distributed by the Copyright Holder(s).
|
|
.
|
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
or substituting -- in part or in whole -- any of the components of the
|
|
Original Version, by changing formats or by porting the Font Software to a
|
|
new environment.
|
|
.
|
|
"Author" refers to any designer, engineer, programmer, technical
|
|
writer or other person who contributed to the Font Software.
|
|
.
|
|
PERMISSION & CONDITIONS
|
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
redistribute, and sell modified and unmodified copies of the Font
|
|
Software, subject to the following conditions:
|
|
.
|
|
1) Neither the Font Software nor any of its individual components,
|
|
in Original or Modified Versions, may be sold by itself.
|
|
.
|
|
2) Original or Modified Versions of the Font Software may be bundled,
|
|
redistributed and/or sold with any software, provided that each copy
|
|
contains the above copyright notice and this license. These can be
|
|
included either as stand-alone text files, human-readable headers or
|
|
in the appropriate machine-readable metadata fields within text or
|
|
binary files as long as those fields can be easily viewed by the user.
|
|
.
|
|
3) No Modified Version of the Font Software may use the Reserved Font
|
|
Name(s) unless explicit written permission is granted by the corresponding
|
|
Copyright Holder. This restriction only applies to the primary font name as
|
|
presented to the users.
|
|
.
|
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
Software shall not be used to promote, endorse or advertise any
|
|
Modified Version, except to acknowledge the contribution(s) of the
|
|
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
permission.
|
|
.
|
|
5) The Font Software, modified or unmodified, in part or in whole,
|
|
must be distributed entirely under this license, and must not be
|
|
distributed under any other license. The requirement for fonts to
|
|
remain under this license does not apply to any document created
|
|
using the Font Software.
|
|
.
|
|
TERMINATION
|
|
This license becomes null and void if any of the above conditions are
|
|
not met.
|
|
.
|
|
DISCLAIMER
|
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
|
|
License: CC-BY-4.0
|
|
Creative Commons Attribution 4.0 International Public Licence (CC BY 4.0).
|
|
.
|
|
You are free to:
|
|
.
|
|
* Share — copy and redistribute the material in any medium or format.
|
|
* Adapt — remix, transform, and build upon the material for any
|
|
purpose, even commercially.
|
|
.
|
|
The licensor cannot revoke these freedoms as long as you follow the
|
|
licence terms.
|
|
.
|
|
Under the following terms:
|
|
.
|
|
* Attribution — You must give appropriate credit, provide a link to
|
|
the licence, and indicate if changes were made. You may do so in
|
|
any reasonable manner, but not in any way that suggests the
|
|
licensor endorses you or your use.
|
|
* No additional restrictions — You may not apply legal terms or
|
|
technological measures that legally restrict others from doing
|
|
anything the licence permits.
|
|
.
|
|
The full text of this licence is reproduced verbatim at:
|
|
https://creativecommons.org/licenses/by/4.0/legalcode
|
|
.
|
|
A human-readable summary (which is not a substitute for the licence) is
|
|
available at:
|
|
https://creativecommons.org/licenses/by/4.0/
|
|
.
|
|
The licence text above is a summary; the canonical legal text at the URL
|
|
is what governs use, distribution and modification of the Licensed
|
|
Material referenced under `Files: themes/default/icons/catalogue/*`.
|
|
|
|
License: CC-BY-SA-3.0
|
|
Creative Commons Attribution-ShareAlike 3.0 (CC BY-SA 3.0).
|
|
.
|
|
You are free to share and adapt the material for any purpose, even
|
|
commercially, provided you give appropriate credit, provide a link to
|
|
the licence, indicate if changes were made, and distribute your
|
|
contributions under the same licence as the original (ShareAlike).
|
|
.
|
|
The canonical legal text is at:
|
|
https://creativecommons.org/licenses/by-sa/3.0/legalcode
|
|
.
|
|
A human-readable summary (which is not a substitute for the licence) is
|
|
available at:
|
|
https://creativecommons.org/licenses/by-sa/3.0/
|
|
.
|
|
The summary above governs the Adwaita cursor files referenced under
|
|
`Files: themes/default/cursors/*` when distributed under the 3.0 option.
|
|
|
|
License: CC-BY-SA-4.0
|
|
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).
|
|
.
|
|
You are free to share and adapt the material for any purpose, even
|
|
commercially, under the same Attribution and ShareAlike terms as the
|
|
CC BY-SA 3.0 paragraph above.
|
|
.
|
|
The canonical legal text is at:
|
|
https://creativecommons.org/licenses/by-sa/4.0/legalcode
|
|
.
|
|
A human-readable summary (which is not a substitute for the licence) is
|
|
available at:
|
|
https://creativecommons.org/licenses/by-sa/4.0/
|
|
|
|
License: LGPL-3
|
|
The Adwaita cursors are alternatively available under the GNU Lesser
|
|
General Public License version 3. On Debian systems the complete text
|
|
of the LGPL version 3 is in `/usr/share/common-licenses/LGPL-3`.
|
|
|
|
License: MIT
|
|
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.
|