Feed button events through compositor.

This also generalizes the code to send events to a surface a bit.
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 @@
 	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 @@
 	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);