diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2014-08-12 15:13:30 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-08-18 13:27:11 +0300 |
commit | f322f8efea782692c5c45a1d870fb08b68f8fa15 (patch) | |
tree | 62cfa48ab8e895742c6f7773f935c6bd1b761fab | |
parent | e67118c80ad411ac46b7096aae2635510c80ea6d (diff) | |
download | weston-f322f8efea782692c5c45a1d870fb08b68f8fa15.tar.gz weston-f322f8efea782692c5c45a1d870fb08b68f8fa15.tar.bz2 weston-f322f8efea782692c5c45a1d870fb08b68f8fa15.zip |
desktop-shell: add close-animation config option for destroying surfaces
At the moment when surfaces are destroyed they are faded out but let's
make it configurable!
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | desktop-shell/shell.c | 11 | ||||
-rw-r--r-- | desktop-shell/shell.h | 1 | ||||
-rw-r--r-- | man/weston.ini.man | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 73709725..d7560768 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -535,6 +535,9 @@ shell_configuration(struct desktop_shell *shell) weston_config_section_get_string(section, "animation", &s, "none"); shell->win_animation_type = get_animation_type(s); free(s); + weston_config_section_get_string(section, "close-animation", &s, "fade"); + shell->win_close_animation_type = get_animation_type(s); + free(s); weston_config_section_get_string(section, "startup-animation", &s, "fade"); shell->startup_animation_type = get_animation_type(s); @@ -3220,8 +3223,12 @@ handle_resource_destroy(struct wl_listener *listener, void *data) pixman_region32_init(&shsurf->surface->pending.input); pixman_region32_fini(&shsurf->surface->input); pixman_region32_init(&shsurf->surface->input); - weston_fade_run(shsurf->view, 1.0, 0.0, 300.0, - fade_out_done, shsurf); + if (shsurf->shell->win_close_animation_type == ANIMATION_FADE) { + weston_fade_run(shsurf->view, 1.0, 0.0, 300.0, + fade_out_done, shsurf); + } else { + weston_surface_destroy(shsurf->surface); + } } static void diff --git a/desktop-shell/shell.h b/desktop-shell/shell.h index 6e637850..e994cdbe 100644 --- a/desktop-shell/shell.h +++ b/desktop-shell/shell.h @@ -194,6 +194,7 @@ struct desktop_shell { uint32_t binding_modifier; uint32_t exposay_modifier; enum animation_type win_animation_type; + enum animation_type win_close_animation_type; enum animation_type startup_animation_type; enum animation_type focus_animation_type; diff --git a/man/weston.ini.man b/man/weston.ini.man index 22f9f0dd..fbcec81a 100644 --- a/man/weston.ini.man +++ b/man/weston.ini.man @@ -201,6 +201,12 @@ sets the effect used for opening new windows (string). Can be .B none. By default, no animation is used. .TP 7 +.BI "close-animation=" fade +sets the effect used when closing windows (string). Can be +.B fade, +.B none. +By default, the fade animation is used. +.TP 7 .BI "startup-animation=" fade sets the effect used for opening new windows (string). Can be .B fade, |