diff options
author | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2005-11-28 00:03:29 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2005-11-28 00:03:29 +0000 |
commit | 2278db497968b1029acc7dd3a1d575d57e393d0f (patch) | |
tree | 24d1897bf886e22dcbaede32103561a21170af8b | |
parent | e74bd216bb128bb0f56678081ae22fa8d1194794 (diff) | |
download | metacity-2278db497968b1029acc7dd3a1d575d57e393d0f.tar.gz |
*** empty log message ***
-rw-r--r-- | src/compositor.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/compositor.c b/src/compositor.c index d1bdf0d5..bbb4e8b5 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -30,6 +30,7 @@ #include <math.h> #include "snow.h" +#include <math.h> #include <cm/node.h> #include <cm/drawable-node.h> @@ -628,6 +629,23 @@ meta_compositor_process_event (MetaCompositor *compositor, #endif /* HAVE_COMPOSITE_EXTENSIONS */ } +static void +wavy (double time, + double in_x, double in_y, + double *out_x, double *out_y, + gpointer data) +{ + static int m; + time = time * 5; + double dx = 0.0025 * sin (time + 35 * in_y); + double dy = 0.0025 * cos (time + 35 * in_x); + + *out_x = in_x + dx; + *out_y = in_y + dy; + + m++; +} + /* This is called when metacity does its XQueryTree() on startup * and when a new window is mapped. */ @@ -667,6 +685,8 @@ meta_compositor_add_window (MetaCompositor *compositor, else { node = drawable_node_new (drawable); + + drawable_node_set_deformation_func (node, wavy, NULL); } /* FIXME: we should probably just store xid's directly */ |