Clicking SyncMenuApp's 'paused' button causes feedback loop if >1 indicator running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Sync Menu |
Fix Released
|
Low
|
Charles Kerr |
Bug Description
Reported by mterry in IRC.
Behavior: if you have more than one sync indicator running, toggling one of the checkboxes will cause a feedback loop s.t. the same checkbox in the different indicator flickers for a few seconds or more.
(1) User clicks a checkbox in menu A. (2) Dbusmenu's client code listens for the GtkWidget's "activate" signal and propagates it up to the service, where (3) app-menu-item.c gets an "activate" callback, and toggles the SyncMenuApp's "paused" property based on the negated value of DbusmenuMenuitem's TOGGLED property. (4) The SyncMenuApp skeleton's "paused" state is set. (5) Back in the service, app-menu-item.c is listening for SyncMenuApp notify::paused signals, where it toggles DbusmenuMenuitem's TOGGLED property. (5) Dbusmenu sends that property change down to the clients, where our sync-indicator updates its GtkCheckMenuItem's "active" property from DbusmenuMenuitem's TOGGLED property. This is fine because the "active" property is already this value when the user clicked it in step 1.
But, if there are two indicators loaded... menu B's "active" property WILL get changed by step 5, causing an "activate" signal to be emitted, causing steps 2-5 to be repeated, followed by menu A's "active" property being changed, causing a new "activate" signal and steps 2-5 to be repeated again, and so on.
Related branches
- jenkins (community): Needs Fixing (continuous-integration)
- Lars Karlitski (community): Approve
-
Diff: 91 lines (+29/-9)3 files modifiedsrc/indicator/indicator-sync.c (+25/-3)
src/service/app-menu-item.c (+1/-5)
src/service/sync-service.c (+3/-1)
Changed in indicator-sync: | |
status: | In Progress → Fix Committed |
Changed in indicator-sync: | |
status: | Fix Committed → Fix Released |
Setting importance as Low because it's unlikely that end users will have two sync indicators loaded at once.