mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callback which is useful if sender and receiver do not share any other distinct data structure. Will be used first for the clock reset notifier. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e0e8384dd4
commit
9e8dd45164
13 changed files with 23 additions and 23 deletions
|
@ -178,7 +178,7 @@ static const SpiceTabletInterface tablet_interface = {
|
|||
.buttons = tablet_buttons,
|
||||
};
|
||||
|
||||
static void mouse_mode_notifier(Notifier *notifier)
|
||||
static void mouse_mode_notifier(Notifier *notifier, void *data)
|
||||
{
|
||||
QemuSpicePointer *pointer = container_of(notifier, QemuSpicePointer, mouse_mode);
|
||||
bool is_absolute = kbd_mouse_is_absolute();
|
||||
|
@ -213,5 +213,5 @@ void qemu_spice_input_init(void)
|
|||
pointer->absolute = false;
|
||||
pointer->mouse_mode.notify = mouse_mode_notifier;
|
||||
qemu_add_mouse_mode_change_notifier(&pointer->mouse_mode);
|
||||
mouse_mode_notifier(&pointer->mouse_mode);
|
||||
mouse_mode_notifier(&pointer->mouse_mode, NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue