system settings
git clone https://git.lucas.co/cce-system-interface.git
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 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main.rs b/src/main.rs
index 7e5a096..710d03e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -216,7 +216,9 @@ fn emit_control_carve(pc: &mut cce_ui::scene::paint::PaintCtx, carve: ControlCar
impl cce_ui::engine::Application for SystemInterface {
type Message = AppAction;
- fn new(_qh: &wayland_client::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();
cce_ui::scale::set_scale_factor(1.0);
let app = AppState::default();