Add hooks for custom window decorations

This is a first use of the new hooks system, which allows customizing
cosmic-comp at compile-time.
In this case, the view() function of CosmicWindow / CosmicStack is
hooked and the hook can change what is rendered as the header bar.

Signed-off-by: Yureka <yuka@yuka.dev>
This commit is contained in:
Yureka 2025-09-29 17:34:30 +02:00 committed by Victoria Brekenfeld
parent d6e11de1f1
commit a74b6e3a9b
5 changed files with 119 additions and 46 deletions

View file

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
fn main() {
if let Err(err) = cosmic_comp::run() {
if let Err(err) = cosmic_comp::run(Default::default()) {
tracing::error!("Error occured in main(): {}", err);
std::process::exit(1);
}