elementary / elementary/wingpanel
Calling IndicatorManager.register_indicator breaks some indicator display widgets.
- Dominant language
- Vala
- Stars
- 144
- Forks
- 53
- Avg merge
- 13h 44m
- Merged PRs (30d)
- 22
Description
Hi! I'm currently in the process of updating `wingpanel-indicator-ayatana` to work with the latest version of ElementaryOS. While I was doing this, I came across a pretty bad bug that needs [an extremely hacky workaround](https://github.com/eth-p/wingpanel-indicator-ayatana/commit/907e64281a36a81a4ed22fe768a6f1a42c264c2f).
The bug involves calling `IndicatorManager.register_indicator` outside of `IndicatorManager.initialize`, and before all the indicator display widgets are fully loaded (i.e. `get_realized() == true`) and rendered. When this happens, those unloaded display widgets will *never* finish loading.
As you can see in the following image, the Bluetooth indicator is completely invisible, and it shows up as unrealized in the GTK inspector.

Would it be possible to add some way to defer registering new indicators until after all the other indicators are loaded and displayed? Even a signal inside `IndicatorManager` to notify when it's safe to register indicators would do wonders.
Contributor guide
Research direction
Start by reading IndicatorManager.initialize and register_indicator, then inspect when the indicator display widgets reach get_realized(). Reproduce registration before the widgets are loaded; done means indicators registered at a safe lifecycle point no longer leave other display widgets unrealized or invisible.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100