GNOME Bugzilla – Bug 479562
[PATCH] Fancier launcher animation if compositing manager is running
Last modified: 2008-02-11 17:25:46 UTC
The attached patch replaces the current effect when you click on a launcher with a visually more appealing version (a copy of the launcher icon zooming into the user's direction while fading away). The zoom factor, number of steps and delay between steps may not be optimal, but can be tweak with three constants defined as macro. If no composite manager is running, the old effect is used.
Created attachment 96064 [details] [review] Fancy launcher animation
Can't test it right now. Any chance you do a screencast so I see how cool this is? :-)
I don't think you should be doing a usleep (ZOOM_DELAY), as you will block the process while this fancy animation is happening. (At least that's what I understand of looking at the patch.) Use a timeout, instead.
I've been (slowly) working on a suitable animation framework for GTK+ (see bug #444659), it's precisely thought for this kind of animations, so it'd be great if you tried it out and commented your impressions on it :).
(In reply to comment #4) > I've been (slowly) working on a suitable animation framework for GTK+ (see bug > #444659), it's precisely thought for this kind of animations, so it'd be great > if you tried it out and commented your impressions on it :). > Cool, an animation framework was exactly what I was looking for! I will take a look at it when I have the time. But as this is not in GTK+ yet (unfortunately), a "hand-made" solution may have to suffice until GTK+ has support for animations.
(In reply to comment #3) > I don't think you should be doing a usleep (ZOOM_DELAY), as you will block the > process while this fancy animation is happening. (At least that's what I > understand of looking at the patch.) > > Use a timeout, instead. > I used usleep() because it was also used in the code of the old effect. But timeouts may do the job as well. I'll see if I can refactor my code to use them.
Created attachment 96066 [details] Short screencast For Vincent ;): This shows the effect in action. I'm not sure about the exact format to be honest; it was recorded using xvidcap. My first screencast, so don't expect quality. ;)
Good effort. Shame that scaling pixbufs looks so bad, but maybe it's just more noticable when the framerate is low and the video is zoomed like that. :) (BTW, try Istanbul, it makes Theora/Ogg)
(In reply to comment #8) > > (BTW, try Istanbul, it makes Theora/Ogg) > Or gtk-recordmydesktop, which is actively developed, fast and easy to use. (Sorry for the bugspam.)
I wonder why this has to be done at all... can we please also have the option to turn this off entirely?
..if this would be the the current gconf key enable_animation, feel free to ignore my post
(In reply to comment #11) > ..if this would be the the current gconf key enable_animation, feel free to > ignore my post > Yes, the new animation also honors the enable_anmiations gconf key.
Created attachment 96117 [details] [review] Updated animation patch This version uses g_timeout() instead of usleep() calls. I might be halluzinating, but I think this is smoother.
One thing that I myself particularly don't like about this so far is that I can't avoid the little window used for the animation from having compiz' open and close animations applied to it (fade-in/out on my machine; especially the former is not very nice as it means that the icon simulatnously fades in and out...). Does anybody know how to do this? The only thing that worked so far from what I tried is setting the type hint to DND, but this is fairly hackish and probably only works with my configuration.
(In reply to comment #14) > One thing that I myself particularly don't like about this so far is that I > can't avoid the little window used for the animation from having compiz' open > and close animations applied to it. Isn't this a Compiz issue? I do not use Compiz myself, but i recall that gnome-power-manager has a fancy transparent widget to display brightness level when running under a compositing manager. You may see if the same bug applies to that widget too (I remember that the widget is rendered with Cairo too).
If you take a look at compiz' animation plugin you can see the various types where compiz applies effects. Don't know if there is any type that is meant to have no animation...
I know that it is possible to configure compiz that way, but obviously this feature would need a configuration-independent solution. If there is no meant-to-be-unanimated window type, it might be a good idea to propose it, not only for compiz but for all compositing window manager. Maybe a new type hint like AUXILIARY or so, don't know...
Correct. ATM compiz animations (which are not included in compiz core) ship whith these types preconfigured for any type of animation: Normal | Dialog | ModalDialog | Utility | Unknown | Menu | PopupMenu | PropdownMenu | Tooltip | Notification (in compiz notation)
I'll write a mail to the freedesktop mailing list about that.
Got any response Denis?
(In reply to comment #20) > Got any response Denis? > I got some, but the thread seems to have died pretty quickly, although there wasn't much resistance against the idea. I'll post another message soon. Here's the thread: http://mail.gnome.org/archives/wm-spec-list/2007-October/msg00000.html
There's no need for a new message (unless you want more input from non-panel people). I'll get to this patch as soon as I have more time to hack...
I like it.
*** Bug 315998 has been marked as a duplicate of this bug. ***
Created attachment 104960 [details] [review] Updated patch I've reworked the patch to match the style of the panel, and to get rid of the global variables. I can't test it, though.
I had forgotten about metacity compositor. Works nicely. I asked for a feature freeze break, and got it. So it's in! Thanks!