git.lucas.co / cce-list
things-to-remember checklist
git clone https://git.lucas.co/cce-list.git

commitec74364778fa92f320b7097388ca5414291b1c0e
parentf81b063619
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 | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 7738cd6..797df6f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -23,14 +23,13 @@ use cce_list::{
 };
 use vault_tasks::{Row, VaultTasks};
 use cce_ui::widget::Owned;
-use cce_ui::engine::{Application, EngineState, LogicalPosition, LogicalSize, WindowSettings};
+use cce_ui::engine::{Application, LogicalPosition, LogicalSize, WindowSettings};
 use cce_ui::scene::layout::Rect;
 use cce_ui::scene::paint::{Cap, DisplayList, PaintCtx};
 use cce_ui::widget::{
     Adapted, Bounds, Dropdown, ElementState, Event, Key, KeyEvent, MouseButton, MouseScrollDelta,
     NamedKey, ScrollMotion, TextBox, WidgetHost,
 };
-use wayland_client::QueueHandle;
 
 /// Initial size only — the window is freely resizable and the compositor
 /// restores the last geometry across sessions.
@@ -569,10 +568,9 @@ impl ListApp {
 impl Application for ListApp {
     type Message = ListMessage;
 
-    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();
         cce_ui::scale::set_scale_factor(1.0);
         let mut app = Self {
             lists: Vec::new(),