git.lucas.co / cce-gallery
widget gallery and compositor test bench

commitee713707d88deb1c4900e284545ff63d522716d2
parent0fc070b1e9
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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 39e65a9..bc03f8d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,7 +13,6 @@ use cce_ui::widget::{Adapted, LayoutConstraints, Point};
 use cce_ui::widget::input::Slider2D;
 use cce_ui::engine::{LogicalSize, LogicalPosition, LayerAnchor, LayerKeyboardInteractivity, LayerKind, LayerSettings};
 use cce_ui::scene::paint::Prim;
-use wayland_client::QueueHandle;
 
 /// What a child window is, from `--type`. The first seven are the kinds of surface a
 /// toolkit client can be under cce; the last two are the gallery's editor windows.
@@ -1093,7 +1092,7 @@ impl State {
 impl cce_ui::engine::Application for State {
     type Message = String;
 
-    fn new(_qh: &QueueHandle<cce_ui::engine::EngineState<Self>>, _sender: calloop::channel::Sender<Self::Message>) -> Self {
+    fn create(_sender: cce_ui::engine::AppSender<Self::Message>) -> Self {
         let args: Vec<String> = std::env::args().collect();
         let flag = |name: &str| args.iter().any(|a| a == name);
         let value = |name: &str| args.iter().position(|a| a == name).and_then(|i| args.get(i + 1)).cloned();