From 10863eab4ab3da2a93d93b4aaf28cd98603f1907 Mon Sep 17 00:00:00 2001 From: Brage Fuglseth Date: Mon, 10 Jun 2024 21:11:59 +0200 Subject: [PATCH] window: Fix embarrasing mistake see #18 --- src/widgets/window/ui_state.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/widgets/window/ui_state.rs b/src/widgets/window/ui_state.rs index da43156..23d99de 100644 --- a/src/widgets/window/ui_state.rs +++ b/src/widgets/window/ui_state.rs @@ -16,10 +16,11 @@ impl imp::KpWindow { } pub(super) fn setup_ui_hiding(&self) { + let obj = self.obj(); + self.show_cursor.set(true); - let device = self - .obj() + let device = obj .display() .default_seat() .expect("display always has a default seat") @@ -46,7 +47,7 @@ impl imp::KpWindow { } } })); - self.obj().add_controller(motion_ctrl); + obj.add_controller(motion_ctrl); let click_gesture = gtk::GestureClick::new(); click_gesture.connect_released(glib::clone!(@weak self as imp => move |_, _, _, _| { @@ -54,6 +55,7 @@ impl imp::KpWindow { imp.header_bar_running.remove_css_class("hide-controls"); } })); + obj.add_controller(click_gesture); } pub(super) fn ready(&self) {