GNOME Bugzilla – Bug 554343
delay panel slide out until applets are done loading
Last modified: 2009-01-20 13:23:11 UTC
The panel animation when it first loads is really cool. It adds a lot of polish to the login experience. One problem I've noticed with it though is that it slides down too soon. It ends up stuttering while sliding down because applets are busy loading. We should delay sliding down the panel until the applets have had a chance to load.
Created attachment 119609 [details] [review] initial cut I built this into rawhide on Friday. It's a little rough, but the basic idea is that it waits until the queue of unregistered applets drains before starting the slide. I also punt an additional second after all the applets have been registered so they get a little time to e.g. read the current weather or whatever (things they do after telling the panel they're ready)
It's probably nice, but this is really a lot of changes in many areas for this. I'd prefer to have something that's less generic (just a big fat "static gboolean applets_initialized = FALSE" in applet.c and touching only applet.c, panel-applet-frame.c and panel-toplevel.c)
Created attachment 120442 [details] [review] smaller patch So I worked on this a bit at the summit. This version cuts out the layers of closures, etc, that make the patch more invasive than it needs to be.
Created attachment 121138 [details] [review] Precompute struts instead of updating while animating Owen pointed out on IRC yesterday that the panel was making nautilus slide down which looks sort of weird. I guess it wasn't very noticeable before because the slide out would normally happen before nautilus started. Now that we delay the slide out it's a lot more obvious. This patch changes the strut geometry to fill where the panel will be when done animating. Note there's still a race between nautilus and the panel. The panel should tell the session manager it's ready only after setting the struts, which this patch doesn't do.
Created attachment 121929 [details] [review] another update This update sets up the struts earlier, fixes slide in with vertical panels, works better for empty panels,
Created attachment 122306 [details] [review] don't show drawers by default Leszek Matok noticed on http://bugzilla.redhat.com/470719 that the patch in attachment 121929 [details] [review] causes drawers to be opened up by default. This patch addresses that issue.
panel was branched today so just doing a ping.
Ray, I debugged the issue of Nautilus icons jumping when the panel slidedown starts and this minimal patch fixes it for me on F-10. I'm not opening a new bug although it probably is relevant to current code too. diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c index 5d8b8d4..148437a 100644 --- a/gnome-panel/panel-toplevel.c +++ b/gnome-panel/panel-toplevel.c @@ -3360,7 +3360,10 @@ panel_toplevel_start_animation (PanelToplevel *toplevel) (monitor_height - toplevel->priv->geometry.heigh } - if (toplevel->priv->state == PANEL_STATE_NORMAL) + /* If initial animation has not started yet, we treat it as NORMAL. + * This is to avoid jumping all nautilus icons around when we do the + * initial animated unhide */ + if (toplevel->priv->state == PANEL_STATE_NORMAL || !toplevel->priv->init panel_toplevel_update_normal_position (toplevel, &toplevel->priv->animatio &toplevel->priv->animatio
I also think a 1s timeout is too long. On my system login takes 5 sec. 1s means 20 percent longer. I'd do something more like 200ms.
(In reply to comment #8) > Ray, I debugged the issue of Nautilus icons jumping when the panel slidedown > starts and this minimal patch fixes it for me on F-10. I'm not opening a new > bug although it probably is relevant to current code too. Behdad, nearly sure this patch is broken if you have a auto-hidden panel.
(In reply to comment #10) > (In reply to comment #8) > > Ray, I debugged the issue of Nautilus icons jumping when the panel slidedown > > starts and this minimal patch fixes it for me on F-10. I'm not opening a new > > bug although it probably is relevant to current code too. > > Behdad, nearly sure this patch is broken if you have a auto-hidden panel. I suspected that much myself. But I checked, and it wasn't. At least not with Ray's patch. I can check again. That's because with autohidden panels, we don't shift icons when panel comes out, right?
(In reply to comment #11) > (In reply to comment #10) > > Behdad, nearly sure this patch is broken if you have a auto-hidden panel. > > I suspected that much myself. But I checked, and it wasn't. At least not with > Ray's patch. I can check again. That's because with autohidden panels, we > don't shift icons when panel comes out, right? Yeah. Hrm, weird if it works, but well, it's all black magic in this file anyway, so weird things happen. I'll look at it too when I'll commit Ray's patch.
Committing the first part of the patch right now, with a few changes (there were some minor bugs like "if (panel_applets_loading == NULL)" instead of "if (panel_applets_loading == NULL && panel_applets_to_load == NULL)", and I cleaned up things). I removed the 1 second timeout for "applets to frob" because it seems it's not needed anymore (it was mainly needed for a bug I fixed). Will continue right now with the other parts. Just a note: we need a way to force unhide after 5 seconds because an applet might be able to block everything, which is bad.
I was not a big fan of the way you handled the struts thing. After playing with this, I found another way that is cleaner IMHO and committed it. It also fixes Behdad's stuff. The only thing left is vertical panels which are doing some weird stuff. Will try to find your fix in your patch. (In reply to comment #13) > Just a note: we need a way to force unhide after 5 seconds because an applet > might be able to block everything, which is bad. Actually not sure it's needed. We'll see, I guess.
(In reply to comment #14) > The only thing left is vertical panels which are doing some weird stuff. Will > try to find your fix in your patch. Only happening when I have a vertical panel and an expanded top panel. It's actually funny. Still a bug, but funny :-)
Got the final bug.