summary refs log tree commit diff stats
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2023-09-21 17:29:34 +0900
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-10-03 15:04:56 +0400
commit0337e4123e62721bd0bcb4d5645fee2a31e8906d (patch)
treeec7f8f7e9894c6fdedbf10d5b06d7ca8067a8c69 /ui/vnc.c
parent50d0bfd0ed78209f003e8f7b9ac25edaa0399157 (diff)
downloadfocaccia-qemu-0337e4123e62721bd0bcb4d5645fee2a31e8906d.tar.gz
focaccia-qemu-0337e4123e62721bd0bcb4d5645fee2a31e8906d.zip
input: Allow to choose console with qemu_input_is_absolute
Although an input is routed depending on the console,
qemu_input_is_absolute() had no mechanism to specify the console.

Accept QemuConsole as an argument for qemu_input_is_absolute, and let
the display know the absolute/relative state for a particular console.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230921082936.28100-1-akihiko.odaki@daynix.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 523eb1f5b0..c66477a390 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1771,7 +1771,7 @@ uint32_t read_u32(uint8_t *data, size_t offset)
 static void check_pointer_type_change(Notifier *notifier, void *data)
 {
     VncState *vs = container_of(notifier, VncState, mouse_mode_notifier);
-    int absolute = qemu_input_is_absolute();
+    int absolute = qemu_input_is_absolute(vs->vd->dcl.con);
 
     if (vnc_has_feature(vs, VNC_FEATURE_POINTER_TYPE_CHANGE) && vs->absolute != absolute) {
         vnc_lock_output(vs);