compositor: Don't pass output to notify_keyboard_focus

Doesn't make sense and was only used to distinguish between enter/leave.
dev
Kristian Høgsberg 13 years ago
parent 78d3afe21c
commit 31dd6b86c1
  1. 6
      src/compositor-wayland.c
  2. 4
      src/compositor-x11.c
  3. 5
      src/compositor.c
  4. 3
      src/compositor.h

@ -595,10 +595,8 @@ input_handle_keyboard_enter(void *data,
{ {
struct wayland_input *input = data; struct wayland_input *input = data;
struct wayland_compositor *c = input->compositor; struct wayland_compositor *c = input->compositor;
struct wayland_output *output;
output = wl_surface_get_user_data(surface); notify_keyboard_focus(c->base.input_device, time, keys);
notify_keyboard_focus(c->base.input_device, time, &output->base, keys);
} }
static void static void
@ -610,7 +608,7 @@ input_handle_keyboard_leave(void *data,
struct wayland_input *input = data; struct wayland_input *input = data;
struct wayland_compositor *c = input->compositor; struct wayland_compositor *c = input->compositor;
notify_keyboard_focus(c->base.input_device, time, NULL, NULL); notify_keyboard_focus(c->base.input_device, time, NULL);
} }
static const struct wl_input_device_listener input_device_listener = { static const struct wl_input_device_listener input_device_listener = {

@ -615,7 +615,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
output = x11_compositor_find_output(c, focus_in->event); output = x11_compositor_find_output(c, focus_in->event);
notify_keyboard_focus(c->base.input_device, notify_keyboard_focus(c->base.input_device,
weston_compositor_get_time(), weston_compositor_get_time(),
&output->base, &c->keys); &c->keys);
free(prev); free(prev);
prev = NULL; prev = NULL;
@ -704,7 +704,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
break; break;
notify_keyboard_focus(c->base.input_device, notify_keyboard_focus(c->base.input_device,
weston_compositor_get_time(), weston_compositor_get_time(),
NULL, NULL); NULL);
break; break;
default: default:

@ -1675,8 +1675,7 @@ destroy_device_saved_kbd_focus(struct wl_listener *listener,
WL_EXPORT void WL_EXPORT void
notify_keyboard_focus(struct wl_input_device *device, notify_keyboard_focus(struct wl_input_device *device,
uint32_t time, struct weston_output *output, uint32_t time, struct wl_array *keys)
struct wl_array *keys)
{ {
struct weston_input_device *wd = struct weston_input_device *wd =
(struct weston_input_device *) device; (struct weston_input_device *) device;
@ -1684,7 +1683,7 @@ notify_keyboard_focus(struct wl_input_device *device,
struct wl_surface *surface; struct wl_surface *surface;
uint32_t *k; uint32_t *k;
if (output) { if (keys) {
wl_array_copy(&wd->input_device.keys, keys); wl_array_copy(&wd->input_device.keys, keys);
wd->modifier_state = 0; wd->modifier_state = 0;
wl_array_for_each(k, &device->keys) { wl_array_for_each(k, &device->keys) {

@ -391,8 +391,7 @@ notify_pointer_focus(struct wl_input_device *device,
void void
notify_keyboard_focus(struct wl_input_device *device, notify_keyboard_focus(struct wl_input_device *device,
uint32_t time, struct weston_output *output, uint32_t time, struct wl_array *keys);
struct wl_array *keys);
void void
notify_touch(struct wl_input_device *device, uint32_t time, int touch_id, notify_touch(struct wl_input_device *device, uint32_t time, int touch_id,

Loading…
Cancel
Save