elementary / elementary/wingpanel

Calling IndicatorManager.register_indicator breaks some indicator display widgets.

Open
#163 0 comments 0 reactions 0 assignees View on GitHub
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.

![screenshot from 2018-10-19 00 48 22](https://user-images.githubusercontent.com/32112321/47204664-b4380680-d338-11e8-8183-2adda86b82a7.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.