git.lucas.co / cce-files
file manager
git clone https://git.lucas.co/cce-files.git

commit62c68733ef169c0dd216602129a2c4315a8e3203
parent2292d0f3dc
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, 3 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs
index 6d71275..8ba8606 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,3 @@
-use wayland_client::QueueHandle;
 use cce_ui::widget::Owned;
 use cce_ui::cosmic_text::FontSystem;
 
@@ -1511,7 +1510,9 @@ impl Application for FilesystemApp {
         self.ui_context.drag_allowed_at(px, py)
     }
 
-    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 {
+        // The app keeps calloop's sender; `AppSender` converts into it.
+        let sender: calloop::channel::Sender<Self::Message> = sender.into();
         // Parse command line arguments
         let args: Vec<String> = std::env::args().collect();
         let select_directory = args.iter().any(|arg| arg == "--select-dir");