git.lucas.co / cce-status-interface
status bar
git clone https://git.lucas.co/cce-status-interface.git

commit7414fac61948ca6b6caa5ddc808cc013034d110f
parentab3fe77f45
authorLucas Galante <lsgalante12@gmail.com>
date2026-10-08 08:12
refactor: build the app with Application::create

Application::new(qh, sender) took the session's Wayland queue handle,
which no client ever used, and calloop's sender; cce-ui is retiring it
for create(sender: AppSender<_>), which names no window system. The
body is unchanged: an app that keeps calloop's sender converts the
AppSender into it on the first line, and the now-unused QueueHandle and
EngineState imports go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/main.rs | 4 +++-
 src/osd.rs  | 7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 20e0135..071736c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1360,7 +1360,9 @@ impl cce_ui::engine::Application for StatusApp {
         true
     }
 
-    fn new(_qh: &wayland_client::QueueHandle<cce_ui::engine::EngineState<Self>>, sender: calloop::channel::Sender<Self::Message>) -> Self {
+    fn create(sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
+        // The app keeps calloop's sender; `AppSender` converts into it.
+        let sender: calloop::channel::Sender<Self::Message> = sender.into();
         let selected_module = parse_selected_module_from_args();
 
         let mut left_modules: Vec<Box<dyn StatusModule>> = Vec::new();
diff --git a/src/osd.rs b/src/osd.rs
index 6e96e12..8fa633d 100644
--- a/src/osd.rs
+++ b/src/osd.rs
@@ -31,12 +31,11 @@
 use cce_ui::scene::paint::DropletFinish;
 use cce_ui::cosmic_text::FontSystem;
 use cce_ui::engine::{
-    EngineState, LayerAnchor, LayerKeyboardInteractivity, LayerKind, LayerSettings, LogicalPosition, LogicalSize,
+    LayerAnchor, LayerKeyboardInteractivity, LayerKind, LayerSettings, LogicalPosition, LogicalSize,
     WindowSettings,
 };
 use cce_ui::scene::layout::Rect;
 use cce_ui::widget::{ElementState, KeyEvent, MouseButton, MouseScrollDelta};
-use wayland_client::QueueHandle;
 
 use crate::{LevelChange, StatusBoxBevel};
 
@@ -353,7 +352,9 @@ fn quad_of(text: [f32; 4], a: f32) -> [f32; 4] {
 impl cce_ui::engine::Application for OsdApp {
     type Message = OsdEvent;
 
-    fn new(_qh: &QueueHandle<EngineState<Self>>, sender: calloop::channel::Sender<Self::Message>) -> Self {
+    fn create(sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
+        // The app keeps calloop's sender; `AppSender` converts into it.
+        let sender: calloop::channel::Sender<Self::Message> = sender.into();
         let level = INITIAL.get().copied().unwrap_or(Level::Brightness(0));
         let forward = sender.clone();
         cce_ui::ipc::instance::serve(move |line| {