evdev: change evdev_seat into weston_seat in struct evdev_input_device

We are phasing out struct evdev_seat.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
dev
Pekka Paalanen 13 years ago committed by Kristian Høgsberg
parent cfa1f6727b
commit 5618d6fa05
  1. 2
      src/evdev-touchpad.c
  2. 20
      src/evdev.c
  3. 2
      src/evdev.h

@ -442,7 +442,7 @@ process_key(struct touchpad_dispatch *touchpad,
case BTN_FORWARD: case BTN_FORWARD:
case BTN_BACK: case BTN_BACK:
case BTN_TASK: case BTN_TASK:
notify_button(&device->master->base.seat, notify_button(&device->seat->seat,
time, e->code, time, e->code,
e->value ? WL_POINTER_BUTTON_STATE_PRESSED : e->value ? WL_POINTER_BUTTON_STATE_PRESSED :
WL_POINTER_BUTTON_STATE_RELEASED); WL_POINTER_BUTTON_STATE_RELEASED);

@ -76,14 +76,14 @@ evdev_process_key(struct evdev_input_device *device,
case BTN_FORWARD: case BTN_FORWARD:
case BTN_BACK: case BTN_BACK:
case BTN_TASK: case BTN_TASK:
notify_button(&device->master->base.seat, notify_button(&device->seat->seat,
time, e->code, time, e->code,
e->value ? WL_POINTER_BUTTON_STATE_PRESSED : e->value ? WL_POINTER_BUTTON_STATE_PRESSED :
WL_POINTER_BUTTON_STATE_RELEASED); WL_POINTER_BUTTON_STATE_RELEASED);
break; break;
default: default:
notify_key(&device->master->base.seat, notify_key(&device->seat->seat,
time, e->code, time, e->code,
e->value ? WL_KEYBOARD_KEY_STATE_PRESSED : e->value ? WL_KEYBOARD_KEY_STATE_PRESSED :
WL_KEYBOARD_KEY_STATE_RELEASED, WL_KEYBOARD_KEY_STATE_RELEASED,
@ -165,13 +165,13 @@ evdev_process_relative(struct evdev_input_device *device,
device->pending_events |= EVDEV_RELATIVE_MOTION; device->pending_events |= EVDEV_RELATIVE_MOTION;
break; break;
case REL_WHEEL: case REL_WHEEL:
notify_axis(&device->master->base.seat, notify_axis(&device->seat->seat,
time, time,
WL_POINTER_AXIS_VERTICAL_SCROLL, WL_POINTER_AXIS_VERTICAL_SCROLL,
wl_fixed_from_int(e->value)); wl_fixed_from_int(e->value));
break; break;
case REL_HWHEEL: case REL_HWHEEL:
notify_axis(&device->master->base.seat, notify_axis(&device->seat->seat,
time, time,
WL_POINTER_AXIS_HORIZONTAL_SCROLL, WL_POINTER_AXIS_HORIZONTAL_SCROLL,
wl_fixed_from_int(e->value)); wl_fixed_from_int(e->value));
@ -216,7 +216,7 @@ is_motion_event(struct input_event *e)
static void static void
evdev_flush_motion(struct evdev_input_device *device, uint32_t time) evdev_flush_motion(struct evdev_input_device *device, uint32_t time)
{ {
struct weston_seat *master = &device->master->base; struct weston_seat *master = device->seat;
if (!device->pending_events) if (!device->pending_events)
return; return;
@ -337,7 +337,7 @@ evdev_input_device_data(int fd, uint32_t mask, void *data)
struct input_event ev[32]; struct input_event ev[32];
int len; int len;
ec = device->master->base.compositor; ec = device->seat->compositor;
if (!ec->focus) if (!ec->focus)
return 1; return 1;
@ -452,11 +452,11 @@ evdev_configure_device(struct evdev_input_device *device)
if ((device->caps & if ((device->caps &
(EVDEV_MOTION_ABS | EVDEV_MOTION_REL | EVDEV_BUTTON))) (EVDEV_MOTION_ABS | EVDEV_MOTION_REL | EVDEV_BUTTON)))
weston_seat_init_pointer(&device->master->base); weston_seat_init_pointer(device->seat);
if ((device->caps & EVDEV_KEYBOARD)) if ((device->caps & EVDEV_KEYBOARD))
weston_seat_init_keyboard(&device->master->base, NULL); weston_seat_init_keyboard(device->seat, NULL);
if ((device->caps & EVDEV_TOUCH)) if ((device->caps & EVDEV_TOUCH))
weston_seat_init_touch(&device->master->base); weston_seat_init_touch(device->seat);
return 0; return 0;
} }
@ -476,7 +476,7 @@ evdev_input_device_create(struct evdev_seat *master,
device->output = device->output =
container_of(ec->output_list.next, struct weston_output, link); container_of(ec->output_list.next, struct weston_output, link);
device->master = master; device->seat = &master->base;
device->is_mt = 0; device->is_mt = 0;
device->mtdev = NULL; device->mtdev = NULL;
device->devnode = strdup(path); device->devnode = strdup(path);

@ -54,7 +54,7 @@ enum evdev_device_capability {
}; };
struct evdev_input_device { struct evdev_input_device {
struct evdev_seat *master; struct weston_seat *seat;
struct wl_list link; struct wl_list link;
struct wl_event_source *source; struct wl_event_source *source;
struct weston_output *output; struct weston_output *output;

Loading…
Cancel
Save