From d9082047007fcc3b4a2212ba0db81bafcf115962 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 15 Oct 2024 10:05:19 -0700 Subject: [PATCH] Store `ExtIdleNotificationV1` Needed to destroy the idle notification and create new one with different time. --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 95bf887..a02bf1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,6 +114,7 @@ struct StateInner { struct State { inner: StateInner, outputs: Vec, + _idle_notification: ext_idle_notification_v1::ExtIdleNotificationV1, } impl State { @@ -185,7 +186,7 @@ fn main() { .collect() }); - idle_notifier.get_idle_notification(IDLE_TIME, &seat, &qh, ()); + let _idle_notification = idle_notifier.get_idle_notification(IDLE_TIME, &seat, &qh, ()); let mut state = State { inner: StateInner { @@ -196,6 +197,7 @@ fn main() { single_pixel_buffer_manager, qh, }, + _idle_notification, outputs, }; loop {