diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2014-10-18 18:42:19 +0200 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2016-07-26 17:21:15 +0800 |
commit | 94e2e2d39f6f11ec38b41658d8ea415fa2f5a783 (patch) | |
tree | 794a79a7f28e6d1d1864435be93392c7e46a597e /desktop-shell | |
parent | 4361b4ea3f789c08eb191fe46d176398deb0a86c (diff) |
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>
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 4a44f966..9b77add9 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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); } |