git.lucas.co / cce-terminal
terminal emulator
git clone https://git.lucas.co/cce-terminal.git

commit09562b9f59094aa56e814dfb607892a678aa689e
parentcb84fed02c
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 88f7ef4..7457bdc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -60,11 +60,10 @@ use alacritty_terminal::term::{ClipboardType, Config as TermConfig, Term, TermMo
 use alacritty_terminal::vte::ansi::{
     Color as AnsiColor, CursorShape, NamedColor, Processor, Rgb,
 };
-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::{DisplayList, PaintCtx, TextAttrs};
 use cce_ui::widget::{Bounds, ElementState, Key, KeyEvent, MouseButton, MouseScrollDelta, NamedKey, ScrollMotion};
-use wayland_client::QueueHandle;
 
 const INIT_W: u32 = 840;
 const INIT_H: u32 = 520;
@@ -762,10 +761,9 @@ struct TextRun {
 impl Application for TerminalApp {
     type Message = Msg;
 
-    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();
         // The window-edge inset: the root plate's roll plus one padding.
         let pad = cce_ui::layout::root_plate_inset();
         // `.3` is the `fonts { terminal }` family (this was the 7-tuple's