summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-04-09 22:10:00 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-04-10 00:04:22 -0400
commit31dd6b86c156c3b7ab54c8026424b60b31eca435 (patch)
tree5038fedb6283ab70bd5f700fbd5f5069839994a9
parent78d3afe21cdcd8ac284ad9bd08bc1948dd14496e (diff)
compositor: Don't pass output to notify_keyboard_focus
Doesn't make sense and was only used to distinguish between enter/leave.
-rw-r--r--src/compositor-wayland.c6
-rw-r--r--src/compositor-x11.c4
-rw-r--r--src/compositor.c5
-rw-r--r--src/compositor.h3
4 files changed, 7 insertions, 11 deletions
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index c79d6b5..5eafbd8 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -595,10 +595,8 @@ input_handle_keyboard_enter(void *data,
{
struct wayland_input *input = data;
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, &output->base, keys);
+ notify_keyboard_focus(c->base.input_device, time, keys);
}
static void
@@ -610,7 +608,7 @@ input_handle_keyboard_leave(void *data,
struct wayland_input *input = data;
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 = {
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 62b514e..122e38a 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -615,7 +615,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
output = x11_compositor_find_output(c, focus_in->event);
notify_keyboard_focus(c->base.input_device,
weston_compositor_get_time(),
- &output->base, &c->keys);
+ &c->keys);
free(prev);
prev = NULL;
@@ -704,7 +704,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
break;
notify_keyboard_focus(c->base.input_device,
weston_compositor_get_time(),
- NULL, NULL);
+ NULL);
break;
default:
diff --git a/src/compositor.c b/src/compositor.c
index 5c5331e..1bdca11 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1675,8 +1675,7 @@ destroy_device_saved_kbd_focus(struct wl_listener *listener,
WL_EXPORT void
notify_keyboard_focus(struct wl_input_device *device,
- uint32_t time, struct weston_output *output,
- struct wl_array *keys)
+ uint32_t time, struct wl_array *keys)
{
struct weston_input_device *wd =
(struct weston_input_device *) device;
@@ -1684,7 +1683,7 @@ notify_keyboard_focus(struct wl_input_device *device,
struct wl_surface *surface;
uint32_t *k;
- if (output) {
+ if (keys) {
wl_array_copy(&wd->input_device.keys, keys);
wd->modifier_state = 0;
wl_array_for_each(k, &device->keys) {
diff --git a/src/compositor.h b/src/compositor.h
index 507f549..a49b666 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -391,8 +391,7 @@ notify_pointer_focus(struct wl_input_device *device,
void
notify_keyboard_focus(struct wl_input_device *device,
- uint32_t time, struct weston_output *output,
- struct wl_array *keys);
+ uint32_t time, struct wl_array *keys);
void
notify_touch(struct wl_input_device *device, uint32_t time, int touch_id,