aboutsummaryrefslogtreecommitdiff
path: root/ui/dbus-console.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/dbus-console.c')
-rw-r--r--ui/dbus-console.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ui/dbus-console.c b/ui/dbus-console.c
index 0bfaa2298d..f77bc49d2e 100644
--- a/ui/dbus-console.c
+++ b/ui/dbus-console.c
@@ -412,14 +412,20 @@ dbus_mouse_release(DBusDisplayConsole *ddc,
}
static void
+dbus_mouse_update_is_absolute(DBusDisplayConsole *ddc)
+{
+ g_object_set(ddc->iface_mouse,
+ "is-absolute", qemu_input_is_absolute(),
+ NULL);
+}
+
+static void
dbus_mouse_mode_change(Notifier *notify, void *data)
{
DBusDisplayConsole *ddc =
container_of(notify, DBusDisplayConsole, mouse_mode_notifier);
- g_object_set(ddc->iface_mouse,
- "is-absolute", qemu_input_is_absolute(),
- NULL);
+ dbus_mouse_update_is_absolute(ddc);
}
int dbus_display_console_get_index(DBusDisplayConsole *ddc)
@@ -492,6 +498,7 @@ dbus_display_console_new(DBusDisplay *display, QemuConsole *con)
register_displaychangelistener(&ddc->dcl);
ddc->mouse_mode_notifier.notify = dbus_mouse_mode_change;
qemu_add_mouse_mode_change_notifier(&ddc->mouse_mode_notifier);
+ dbus_mouse_update_is_absolute(ddc);
return ddc;
}