Skip to content

Instantly share code, notes, and snippets.

@aroman
Created April 18, 2014 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aroman/11025401 to your computer and use it in GitHub Desktop.
Save aroman/11025401 to your computer and use it in GitHub Desktop.
// dim_windows method copied with animation effects removed, kept dock methods to update dock with first switch
void window_delay() {
var current_actor = current_window.get_compositor_private() as Actor;
var i = counter = 0;
foreach (var clone in window_clones) {
if (current_actor == clone.source) {
set_child_below_sibling(clone, dock_background);
dock.get_child_at_index(i).animate(AnimationMode.LINEAR, 100, opacity: 255);
} else {
dock.get_child_at_index(i).animate(AnimationMode.LINEAR, 100, opacity: 100);
}
// displays the effect every 500 ms
if (counter == 500) {
clone.animate(Clutter.AnimationMode.EASE_OUT_QUAD, 250, depth: -200.0f, opacity: 0);
counter = 0;
}
i++;
counter++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment