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 554343 - delay panel slide out until applets are done loading
delay panel slide out until applets are done loading
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-29 18:32 UTC by Ray Strode [halfline]
Modified: 2009-01-20 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial cut (14.15 KB, patch)
2008-09-29 18:37 UTC, Ray Strode [halfline]
needs-work Details | Review
smaller patch (9.49 KB, patch)
2008-10-12 15:48 UTC, Ray Strode [halfline]
none Details | Review
Precompute struts instead of updating while animating (15.22 KB, patch)
2008-10-22 15:08 UTC, Ray Strode [halfline]
none Details | Review
another update (23.04 KB, patch)
2008-11-04 03:08 UTC, Ray Strode [halfline]
none Details | Review
don't show drawers by default (22.53 KB, patch)
2008-11-10 05:12 UTC, Ray Strode [halfline]
none Details | Review

Description Ray Strode [halfline] 2008-09-29 18:32:08 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.
Comment 1 Ray Strode [halfline] 2008-09-29 18:37:24 UTC
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)
Comment 2 Vincent Untz 2008-10-01 08:25:46 UTC
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)
Comment 3 Ray Strode [halfline] 2008-10-12 15:48:10 UTC
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.
Comment 4 Ray Strode [halfline] 2008-10-22 15:08:54 UTC
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.
Comment 5 Ray Strode [halfline] 2008-11-04 03:08:03 UTC
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,
Comment 6 Ray Strode [halfline] 2008-11-10 05:12:12 UTC
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.
Comment 7 Ray Strode [halfline] 2008-11-25 18:22:18 UTC
panel was branched today so just doing a ping.
Comment 8 Behdad Esfahbod 2008-12-08 05:08:38 UTC
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
Comment 9 Behdad Esfahbod 2008-12-08 05:10:10 UTC
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.
Comment 10 Vincent Untz 2008-12-09 01:10:50 UTC
(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.
Comment 11 Behdad Esfahbod 2008-12-09 09:10:22 UTC
(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?
Comment 12 Vincent Untz 2008-12-09 11:25:42 UTC
(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.
Comment 13 Vincent Untz 2009-01-20 07:24:14 UTC
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.
Comment 14 Vincent Untz 2009-01-20 11:56:39 UTC
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.
Comment 15 Vincent Untz 2009-01-20 12:41:42 UTC
(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 :-)
Comment 16 Vincent Untz 2009-01-20 13:23:11 UTC
Got the final bug.