autocommit 2022-04-17 17:08:31 CEST
This commit is contained in:
parent
50b792db78
commit
a30306e3d5
23 changed files with 390 additions and 42 deletions
10
src/state.rs
10
src/state.rs
|
|
@ -44,6 +44,7 @@ use {
|
|||
time::Duration,
|
||||
},
|
||||
};
|
||||
use crate::xwayland::XWaylandEvent;
|
||||
|
||||
pub struct State {
|
||||
pub xkb_ctx: XkbContext,
|
||||
|
|
@ -92,6 +93,7 @@ pub struct State {
|
|||
pub struct XWaylandState {
|
||||
pub enabled: Cell<bool>,
|
||||
pub handler: RefCell<Option<SpawnedFuture<()>>>,
|
||||
pub queue: Rc<AsyncQueue<XWaylandEvent>>,
|
||||
}
|
||||
|
||||
pub struct IdleState {
|
||||
|
|
@ -101,6 +103,14 @@ pub struct IdleState {
|
|||
pub timeout_changed: Cell<bool>,
|
||||
}
|
||||
|
||||
impl IdleState {
|
||||
pub fn set_timeout(&self, timeout: Duration) {
|
||||
self.timeout.set(timeout);
|
||||
self.timeout_changed.set(true);
|
||||
self.change.trigger();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InputDeviceData {
|
||||
pub handler: SpawnedFuture<()>,
|
||||
pub id: InputDeviceId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue