git.lucas.co / cce-notes
notes editor over the vault (Obsidian-compatible)
git clone https://git.lucas.co/cce-notes.git

commit8e6c14e281a57d21f9f8380e8f25a8e98d2f348a
parent8d2f2f0127
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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index dde7822..4807029 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -34,7 +34,7 @@ use std::sync::OnceLock;
 use std::time::{Duration, Instant};
 
 use cce_ui::widget::Owned;
-use cce_ui::engine::{Application, CursorIcon, EngineState, LogicalPosition, LogicalSize, WindowSettings};
+use cce_ui::engine::{Application, CursorIcon, LogicalPosition, LogicalSize, WindowSettings};
 use cce_ui::scene::layout::Rect;
 use cce_ui::scene::paint::{DisplayList, PaintCtx};
 use cce_ui::widget::{
@@ -44,7 +44,6 @@ use cce_ui::widget::{
 use cce_ui::widget::doc_editor::{self, DocEditor, EditorTheme, Pos};
 use cce_vault::markdown::{Block, SpanLink};
 use cce_vault::{FileKind, Index, VaultWatcher};
-use wayland_client::QueueHandle;
 
 use instance::Command;
 use panel::{Action, Panel};
@@ -1567,7 +1566,9 @@ impl Application for NotesApp {
         Some(&mut self.ui_context)
     }
 
-    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 startup = STARTUP.get().expect("startup set in main");
         let (index, vault_error, watcher) = match &startup.vault {
             Ok(root) => match Index::open(root, true) {