qemu-rdw: make mouse relative by default

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-11-15 14:42:06 +04:00
parent 9fd90c70c8
commit 788987acce
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,7 @@ mod imp {
fn constructed(&self) {
self.parent_constructed();
self.obj().set_mouse_absolute(true);
self.obj().set_mouse_absolute(false);
self.obj().connect_key_event(
clone!(@weak self as this => move |_, keyval, keycode, event| {
@ -216,6 +216,7 @@ mod imp {
}
}));
let mut abs_changed = console.mouse.receive_is_absolute_changed().await;
this.obj().set_mouse_absolute(console.mouse.is_absolute().await.unwrap_or(false));
MainContext::default().spawn_local(clone!(@weak this => async move {
while let Some(abs) = abs_changed.next().await {
if let Ok(abs) = abs.get().await {