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>
This commit is contained in:
Jonas Ådahl
2014-10-18 18:42:19 +02:00
parent 4361b4ea3f
commit 94e2e2d39f
4 changed files with 44 additions and 1 deletions
+2 -1
View File
@@ -5183,7 +5183,7 @@ activate(struct desktop_shell *shell, struct weston_view *view,
* 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 @@ click_to_activate_binding(struct weston_pointer *pointer, uint32_t time,
return;
activate_binding(pointer->seat, data, pointer->focus,
WESTON_ACTIVATE_FLAG_CLICKED |
WESTON_ACTIVATE_FLAG_CONFIGURE);
}