1
0
Fork 0
forked from wry/wry

autocommit 2022-04-17 17:08:31 CEST

This commit is contained in:
Julian Orth 2022-04-17 17:08:31 +02:00
parent 50b792db78
commit a30306e3d5
23 changed files with 390 additions and 42 deletions

View file

@ -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,