Skip to content

Commit

Permalink
input-legacy: remove kbd_mouse_has_absolute
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
kraxel committed Mar 5, 2014
1 parent faecd95 commit 16b0ecd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
3 changes: 0 additions & 3 deletions include/ui/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ 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);

struct MouseTransformInfo {
/* Touchscreen resolution */
int x;
Expand Down
21 changes: 2 additions & 19 deletions ui/input-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,20 +366,16 @@ void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry)

static void check_mode_change(void)
{
static int current_is_absolute, current_has_absolute;
static int current_is_absolute;
int is_absolute;
int has_absolute;

is_absolute = kbd_mouse_is_absolute();
has_absolute = kbd_mouse_has_absolute();

if (is_absolute != current_is_absolute ||
has_absolute != current_has_absolute) {
if (is_absolute != current_is_absolute) {
notifier_list_notify(&mouse_mode_notifiers, NULL);
}

current_is_absolute = is_absolute;
current_has_absolute = has_absolute;
}

static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
Expand Down Expand Up @@ -567,19 +563,6 @@ int kbd_mouse_is_absolute(void)
return QTAILQ_FIRST(&mouse_handlers)->qemu_put_mouse_event_absolute;
}

int kbd_mouse_has_absolute(void)
{
QEMUPutMouseEntry *entry;

QTAILQ_FOREACH(entry, &mouse_handlers, node) {
if (entry->qemu_put_mouse_event_absolute) {
return 1;
}
}

return 0;
}

MouseInfoList *qmp_query_mice(Error **errp)
{
MouseInfoList *mice_list = NULL;
Expand Down

0 comments on commit 16b0ecd

Please sign in to comment.