Add notifier for mouse mode changes
Right now, DisplayState clients rely on polling the mouse mode to determine
when the device is changed to an absolute device. Use a notification list to
add an explicit notification.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/console.h b/console.h
index f3c619f..6def115 100644
--- a/console.h
+++ b/console.h
@@ -3,6 +3,7 @@
#include "qemu-char.h"
#include "qdict.h"
+#include "notify.h"
/* keyboard/mouse support */
@@ -56,6 +57,8 @@
/* Does the current mouse generate absolute events */
int kbd_mouse_is_absolute(void);
+void qemu_add_mouse_mode_change_notifier(Notifier *notify);
+void qemu_remove_mouse_mode_change_notifier(Notifier *notify);
/* Of all the mice, is there one that generates absolute events */
int kbd_mouse_has_absolute(void);