compositor: Forward pointer focus notification from compostor backend

This lets the compositor place the pointer sprite correctly when it receives
pointer focus and allows it to send pointer focus to any client that might
receive pointer focus as the compositor receives it.
diff --git a/compositor/compositor-x11.c b/compositor/compositor-x11.c
index cbd266a..4a5f10b 100644
--- a/compositor/compositor-x11.c
+++ b/compositor/compositor-x11.c
@@ -547,6 +547,7 @@
 	struct wl_event_loop *loop;
 	xcb_client_message_event_t *client_message;
 	xcb_motion_notify_event_t *motion_notify;
+	xcb_enter_notify_event_t *enter_notify;
 	xcb_key_press_event_t *key_press;
 	xcb_button_press_event_t *button_press;
 	xcb_expose_event_t *expose;
@@ -605,13 +606,22 @@
 			break;
 
 		case XCB_ENTER_NOTIFY:
-			c->base.focus = 1;
-			wlsc_compositor_schedule_repaint(&c->base);
+			enter_notify = (xcb_enter_notify_event_t *) event;
+			output = x11_compositor_find_output(c, enter_notify->event);
+			notify_pointer_focus(c->base.input_device,
+					     enter_notify->time,
+					     &output->base,
+					     enter_notify->event_x,
+					     enter_notify->event_y);
 			break;
 
 		case XCB_LEAVE_NOTIFY:
-			c->base.focus = 0;
-			wlsc_compositor_schedule_repaint(&c->base);
+			enter_notify = (xcb_enter_notify_event_t *) event;
+			notify_pointer_focus(c->base.input_device,
+					     enter_notify->time,
+					     NULL,
+					     enter_notify->event_x,
+					     enter_notify->event_y);
 			break;
 
 		case XCB_CLIENT_MESSAGE: