mirror of
https://github.com/rustdesk/qemu-display.git
synced 2026-10-26 14:10:31 +00:00
qemu-rdw: make mouse relative by default
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
1 parent
9fd90c70c8
commit
788987acce
1 file changed
+2
-1
@@ -56,7 +56,7 @@ mod imp {
|
|||||||
fn constructed(&self) {
|
fn constructed(&self) {
|
||||||
self.parent_constructed();
|
self.parent_constructed();
|
||||||
|
|
||||||
self.obj().set_mouse_absolute(true);
|
self.obj().set_mouse_absolute(false);
|
||||||
|
|
||||||
self.obj().connect_key_event(
|
self.obj().connect_key_event(
|
||||||
clone!(@weak self as this => move |_, keyval, keycode, 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;
|
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 {
|
MainContext::default().spawn_local(clone!(@weak this => async move {
|
||||||
while let Some(abs) = abs_changed.next().await {
|
while let Some(abs) = abs_changed.next().await {
|
||||||
if let Ok(abs) = abs.get().await {
|
if let Ok(abs) = abs.get().await {
|
||||||
|
|||||||
Reference in new issue
Block a user