After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 479562 - [PATCH] Fancier launcher animation if compositing manager is running
[PATCH] Fancier launcher animation if compositing manager is running
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 315998 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-09-23 16:27 UTC by Denis Washington
Modified: 2008-02-11 17:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fancy launcher animation (12.33 KB, patch)
2007-09-23 16:28 UTC, Denis Washington
none Details | Review
Short screencast (119.94 KB, video/mpeg)
2007-09-23 17:32 UTC, Denis Washington
  Details
Updated animation patch (12.42 KB, patch)
2007-09-24 14:09 UTC, Denis Washington
none Details | Review
Updated patch (8.20 KB, patch)
2008-02-11 17:03 UTC, Vincent Untz
committed Details | Review

Description Denis Washington 2007-09-23 16:27:26 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.
Comment 1 Denis Washington 2007-09-23 16:28:39 UTC
Created attachment 96064 [details] [review]
Fancy launcher animation
Comment 2 Vincent Untz 2007-09-23 16:32:07 UTC
Can't test it right now. Any chance you do a screencast so I see how cool this is? :-)
Comment 3 Alexander “weej” Jones 2007-09-23 16:47:56 UTC
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.
Comment 4 Carlos Garnacho 2007-09-23 17:06:30 UTC
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 :).
Comment 5 Denis Washington 2007-09-23 17:12:21 UTC
(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.
Comment 6 Denis Washington 2007-09-23 17:14:09 UTC
(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.
Comment 7 Denis Washington 2007-09-23 17:32:25 UTC
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. ;)
Comment 8 Alexander “weej” Jones 2007-09-23 18:17:50 UTC
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)
Comment 9 Giacomo Perale 2007-09-23 20:59:54 UTC
(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.)
Comment 10 Michael Monreal 2007-09-23 22:15:27 UTC
I wonder why this has to be done at all... can we please also have the option to turn this off entirely?
Comment 11 Michael Monreal 2007-09-23 22:17:39 UTC
..if this would be the the current gconf key enable_animation, feel free to ignore my post
Comment 12 Denis Washington 2007-09-24 12:53:48 UTC
(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.
Comment 13 Denis Washington 2007-09-24 14:09:41 UTC
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.
Comment 14 Denis Washington 2007-10-03 13:42:30 UTC
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.
Comment 15 Cosimo Cecchi 2007-10-03 14:00:28 UTC
(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).
Comment 16 Michael Monreal 2007-10-03 14:29:00 UTC
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...
Comment 17 Denis Washington 2007-10-03 14:34:08 UTC
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...
Comment 18 Michael Monreal 2007-10-03 14:38:46 UTC
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)
Comment 19 Denis Washington 2007-10-03 14:45:48 UTC
I'll write a mail to the freedesktop mailing list about that.
Comment 20 Christian Kirbach 2007-10-11 21:25:39 UTC
Got any response Denis?
Comment 21 Denis Washington 2007-10-12 10:36:44 UTC
(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
Comment 22 Vincent Untz 2007-10-12 15:24:48 UTC
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...
Comment 23 Jakub 'Livio' Rusinek 2007-12-14 12:31:02 UTC
I like it.
Comment 24 Vincent Untz 2008-02-11 15:41:51 UTC
*** Bug 315998 has been marked as a duplicate of this bug. ***
Comment 25 Vincent Untz 2008-02-11 17:03:58 UTC
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.
Comment 26 Vincent Untz 2008-02-11 17:25:46 UTC
I had forgotten about metacity compositor. Works nicely.
I asked for a feature freeze break, and got it. So it's in!
Thanks!