1
0
Fork 0
forked from wry/wry

autocommit 2022-01-09 17:44:06 CET

This commit is contained in:
Julian Orth 2022-01-09 17:44:06 +01:00
parent b08bd94353
commit 0336bf3bde
2 changed files with 17 additions and 10 deletions

View file

@ -757,6 +757,7 @@ impl EventLoopDispatcher for XorgBackend {
impl WheelDispatcher for XorgBackend {
fn dispatch(self: Rc<Self>) -> Result<(), Box<dyn Error + Send + Sync>> {
self.render()?;
self.handle_events()?;
Ok(())
}
}

View file

@ -226,6 +226,7 @@ impl WlSeatGlobal {
.await;
}
self.tl_pointer_event(tl, |p| p.motion(0, x, y)).await;
self.tl_pointer_event(tl, |p| p.frame()).await;
}
}
@ -247,16 +248,6 @@ impl WlSeatGlobal {
if let NodeKind::Toplevel(tl) = kb_node.clone().into_kind() {
self.tl_kb_event(&tl, |k| k.leave(0, tl.surface.surface.surface.id))
.await;
let ModifierState {
mods_depressed,
mods_latched,
mods_locked,
group,
} = self.kb_state.borrow().mods();
self.tl_kb_event(&tl, |k| {
k.modifiers(0, mods_depressed, mods_latched, mods_locked, group)
})
.await;
}
self.keyboard_node.set(node.clone());
}
@ -277,6 +268,16 @@ impl WlSeatGlobal {
)
})
.await;
let ModifierState {
mods_depressed,
mods_latched,
mods_locked,
group,
} = self.kb_state.borrow().mods();
self.tl_kb_event(&node, |k| {
k.modifiers(0, mods_depressed, mods_latched, mods_locked, group)
})
.await;
}
}
}
@ -290,6 +291,8 @@ impl WlSeatGlobal {
};
self.tl_pointer_event(&node, |p| p.axis(0, axis, Fixed::from_int(delta)))
.await;
self.tl_pointer_event(&node, |p| p.frame())
.await;
}
}
@ -422,6 +425,9 @@ impl WlSeatObj {
self.client
.event(p.keymap(wl_keyboard::XKB_V1, p.keymap_fd()?, self.global.layout_size))
.await?;
self.client
.event(p.repeat_info(25, 250))
.await?;
Ok(())
}