git.lucas.co / cce-fonts
font browser

commit940eb53b886d496a6fc33659457c19f9dfb4f41c
parent6e8b9d4391
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 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 48af2e0..4406392 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,9 +1,8 @@
 mod pages;
 
-use wayland_client::QueueHandle;
 use cce_ui::widget::Owned;
 use cce_ui::cosmic_text::FontSystem;
-use cce_ui::engine::{Application, EngineState, LogicalPosition, LogicalSize, WindowSettings};
+use cce_ui::engine::{Application, LogicalPosition, LogicalSize, WindowSettings};
 use cce_ui::widget::{
     MouseButton, ElementState, MouseScrollDelta, KeyEvent, WidgetHost, Event,
     TextBox, Button, Key, NamedKey, Dropdown, Spinbox, ScrollRegion,
@@ -673,7 +672,7 @@ impl Application for TypefaceApp {
         self.ui_context.drag_allowed_at(px, py)
     }
 
-    fn new(_qh: &QueueHandle<EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
+    fn create(_sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
         cce_ui::scale::set_scale_factor(1.0);
         // Parse command line arguments
         let args: Vec<String> = std::env::args().collect();