Comment 14 for bug 878165

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Are you calling GetLayout() before getting the LayoutUpdated signal?

This works fine in Unity because dbusmenu-glib on the panel side only calls GetLayout() only when it gets the LayoutUpdated signal, so it's always guaranteed to work. If you don't wait for this signal, then it probably isn't going to work.

We actually ignore the first AboutToShow() that unity-panel-service sends anyway because it calls this for all top-level menus without following it with "opened" and "closed" events, which is fairly broken. We only process menu updates when we know a menu is opening to prevent Firefox from spamming the session bus with its entire menu structure every time you navigate a web page and the history menu changes (which would also result in Firefox spending time updating its menu right at the point when it should be spending CPU cycles laying out the page that you just loaded). This means that calling AboutToShow() without following it with "opened" and "closed" events (like unity-panel-service is doing) leaves Firefox in a state where it wastes time updating menus when it doesn't need to.