1
0
Fork 0
forked from wry/wry

autocommit 2022-02-17 19:12:52 CET

This commit is contained in:
Julian Orth 2022-02-17 19:12:52 +01:00
parent cf322f05be
commit 195a92d98b
29 changed files with 610 additions and 175 deletions

View file

@ -39,7 +39,12 @@ impl DeviceApi for dyn Keyboard {
self.removed()
}
fn add(self: &Rc<Self>, state: &State, handler: SpawnedFuture<()>, data: Rc<DeviceHandlerData>) {
fn add(
self: &Rc<Self>,
state: &State,
handler: SpawnedFuture<()>,
data: Rc<DeviceHandlerData>,
) {
state.kb_handlers.borrow_mut().insert(
self.id(),
KeyboardData {
@ -83,7 +88,12 @@ impl DeviceApi for dyn Mouse {
self.removed()
}
fn add(self: &Rc<Self>, state: &State, handler: SpawnedFuture<()>, data: Rc<DeviceHandlerData>) {
fn add(
self: &Rc<Self>,
state: &State,
handler: SpawnedFuture<()>,
data: Rc<DeviceHandlerData>,
) {
state.mouse_handlers.borrow_mut().insert(
self.id(),
MouseData {

0
src/tasks/layout.rs Normal file
View file

View file

@ -17,3 +17,12 @@ pub async fn handle_slow_clients(state: Rc<State>) {
let mut sch = SlowClientHandler { state };
sch.handle_events().await;
}
pub async fn do_layout(state: Rc<State>) {
loop {
let node = state.pending_layout.pop().await;
if node.needs_layout() {
node.do_layout();
}
}
}

View file

@ -38,6 +38,7 @@ impl OutputHandler {
stacked: Default::default(),
seat_state: Default::default(),
});
on.workspaces.borrow_mut().push(workspace.clone());
on.workspace.set(Some(workspace));
self.state.root.outputs.set(self.output.id(), on.clone());
self.state.add_global(&global);