animation, shell: add kbd focus change animation
When enabled, this will make all but the keyboard-focused window dim.
Also the background gets dimmed, if there are any windows open. The
panel is not dimmed.
When the keyboard focus changes, the change in dimming is animated.
The dimming is implemented with transparent solid-color surfaces, two at
most. The net effect of two overlapping dim surfaces is kept constant
during animations (stable fade animation).
There is a new weston.ini option "focus-animation", that defaults to
none, and can be set to "dim-layer" to enable the focus change
animation.
[pq: Sliced, squashed, and rebased the patch series. Fixed surface alpha
interaction with the switcher. Wrote the commit message.]
[pochu: rebased, ported to weston_view]
diff --git a/src/compositor.h b/src/compositor.h
index 80fe961..2ceac2d 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -1271,6 +1271,9 @@
struct weston_view_animation;
typedef void (*weston_view_animation_done_func_t)(struct weston_view_animation *animation, void *data);
+void
+weston_view_animation_destroy(struct weston_view_animation *animation);
+
struct weston_view_animation *
weston_zoom_run(struct weston_view *view, float start, float stop,
weston_view_animation_done_func_t done, void *data);
@@ -1283,6 +1286,11 @@
weston_fade_update(struct weston_view_animation *fade, float target);
struct weston_view_animation *
+weston_stable_fade_run(struct weston_view *front_view, float start,
+ struct weston_view *back_view, float end,
+ weston_view_animation_done_func_t done, void *data);
+
+struct weston_view_animation *
weston_slide_run(struct weston_view *view, float start, float stop,
weston_view_animation_done_func_t done, void *data);