Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close animation duration config option #2385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions metadata/animate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
<_long>Sets the duration of fading (in milliseconds) when Wayfire starts.</_long>
<default>600ms linear</default>
</option>
<!-- Close animation -->
<option name="close_duration" type="animation">
<_short>Close animation duration</_short>
<_long>Sets the duration of animation when closing a window.</_long>
<default>400ms</default>
</option>
<!-- Fade animation -->
<option name="fade_enabled_for" type="string">
<_short>Fade animation enabled for specified window types</_short>
Expand Down
3 changes: 2 additions & 1 deletion plugins/animate/animate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ class wayfire_animation : public wf::plugin_interface_t, private wf::per_output_
wf::option_wrapper_t<std::string> close_animation{"animate/close_animation"};

wf::option_wrapper_t<wf::animation_description_t> default_duration{"animate/duration"};
wf::option_wrapper_t<wf::animation_description_t> close_duration{"animate/close_duration"};
wf::option_wrapper_t<wf::animation_description_t> fade_duration{"animate/fade_duration"};
wf::option_wrapper_t<wf::animation_description_t> zoom_duration{"animate/zoom_duration"};
wf::option_wrapper_t<wf::animation_description_t> fire_duration{"animate/fire_duration"};
Expand Down Expand Up @@ -332,7 +333,7 @@ class wayfire_animation : public wf::plugin_interface_t, private wf::per_output_

if (animation_enabled_for.matches(view))
{
return {anim_type, default_duration};
return {anim_type, &anim_type == &close_animation ? close_duration : default_duration};
}

return {"none", wf::animation_description_t{0, {}, ""}};
Expand Down
Loading