diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-12-10 13:16:50 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-12-10 13:16:50 -0500 |
commit | 5a75c90d0153eb8f57993d17a3a0884ed8eb6907 (patch) | |
tree | 7d18ddf5f1a3fa57122a1b150ec26ed0f3414614 /egl-compositor.c | |
parent | 715a081cf48b1d448cf2535309b7727f4b868308 (diff) |
Feed button events through compositor.
This also generalizes the code to send events to a surface a bit.
Diffstat (limited to 'egl-compositor.c')
-rw-r--r-- | egl-compositor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/egl-compositor.c b/egl-compositor.c index c05f363..917364f 100644 --- a/egl-compositor.c +++ b/egl-compositor.c @@ -758,8 +758,8 @@ notify_pointer_motion(struct wl_compositor *compositor, if (es) { sx = (x - es->map.x) * es->width / es->map.width; sy = (y - es->map.y) * es->height / es->map.height; - wl_display_post_surface_motion(ec->wl_display, es->wl_surface, - source, x, y, sx, sy); + wl_surface_post_event(es->wl_surface, source, + WL_INPUT_MOTION, x, y, sx, sy); } ec->pointer->map.x = x - hotspot_x; @@ -784,6 +784,10 @@ notify_pointer_button(struct wl_compositor *compositor, if (es) { wl_list_remove(&es->link); wl_list_insert(ec->surface_list.prev, &es->link); + + /* FIXME: Swallow click on raise? */ + wl_surface_post_event(es->wl_surface, source, + WL_INPUT_BUTTON, button, state); } schedule_repaint(ec); |