From ddc986ea05c5c17758e1028ce0d9f20dc133ec9d Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Wed, 18 Nov 2026 14:12:11 -0700 Subject: add an abstraction called "facilities", which does nothing yet the type system work was a pain, so it's being checked in now Force-Push: yes Change-Id: If7ec15f0108afb030fa2e5a207c77a6cf9828c43 --- src/main.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index a397217..6292619 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ #![allow(linker_messages)] use crate::error::*; +use crate::facilities::*; use crate::geometry::*; use crate::modules::*; use crate::x::*; @@ -28,6 +29,7 @@ use xcb::x::{ }; mod error; +mod facilities; mod geometry; mod modules; mod x; @@ -54,6 +56,7 @@ struct Dock { bounds: Arc>, font: Arc, baseline_position: i16, + facilities: FacilityMap, time_module: Arc>, } @@ -106,8 +109,8 @@ async fn async_main(_shutdown_sender: Sender<()>) -> Result<()> { */ redraw_loop(dock, redraw_receiver, sleep_sender).await?; - event_task.cancel(); - sleep_task.cancel(); + event_task.cancel().await; + sleep_task.cancel().await; Ok(()) } @@ -170,7 +173,9 @@ impl Dock { + vertical_padding as i16 + configuration.baseline_offset as i16; - let time_module = TimeModule::new(); + let facilities = FacilityMap::new(); + + let time_module = TimeModule::new()?; /* We start is_visible at false. Since redraw events set it to true, this * won't make us miss any drawing. @@ -181,6 +186,7 @@ impl Dock { bounds: Arc::new(dock_bounds), font, baseline_position, + facilities, time_module, }; -- cgit 1.4.1