compositor: Keep track of what views were activated by clicking

Adds a weston_view_activate() that can be passed an additional active
flag WESTON_ACTIVATE_CLICKED, that the shell passes when a view was
activated by clicking.

This allows shell-independent components implement heuristics depending
on how a view was activated.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 4a44f96..9b77add 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -5183,7 +5183,7 @@
 	 * Leave fullscreen surfaces on unrelated outputs alone. */
 	lower_fullscreen_layer(shell, shsurf->output);
 
-	weston_seat_set_keyboard_focus(seat, es);
+	weston_view_activate(view, seat, flags);
 
 	state = ensure_focus_state(shell, seat);
 	if (state == NULL)
@@ -5258,6 +5258,7 @@
 		return;
 
 	activate_binding(pointer->seat, data, pointer->focus,
+			 WESTON_ACTIVATE_FLAG_CLICKED |
 			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 }