Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite initial applet layout to prevent position desync #123

Merged
merged 2 commits into from Jun 11, 2022
Merged

Conversation

serebit
Copy link
Member

@serebit serebit commented May 14, 2022

Description

Rather than adding applets directly to the panel on initial panel load, the load_applets function instead uses intermediate region lists sorted by the info's desired position. Once all applet info have been added to the region lists, each applet's info is updated with its actual position within the list, and is then added to the panel. This prevents issues with applets being uninstalled before being removed from the panel, and thus should resolve #72, along with other applet ordering issues that could be the result of initial race conditions.

Submitter Checklist

  • Squashed commits with git rebase -i (if needed)
  • Built budgie-desktop and verified that the patch worked (if needed)

@serebit serebit added the bug Something isn't working label May 23, 2022
Copy link
Member

@JoshStrobl JoshStrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the first review item is a blocker. Kinda just pointless gendering of an applet and doesn't really add any value to the documentation.

The later review item I can't say I care much about. Vala memory management is lacking anyways.

src/panel/panel.vala Outdated Show resolved Hide resolved
src/panel/panel.vala Show resolved Hide resolved
@serebit serebit requested a review from JoshStrobl May 24, 2022 19:37
Copy link
Member

@JoshStrobl JoshStrobl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the excellent work on this. Validated locally as well and did not spot any regressions. 💯

@JoshStrobl JoshStrobl merged commit fd0e76e into master Jun 11, 2022
@JoshStrobl JoshStrobl deleted the fix-72 branch June 11, 2022 23:48
serebit added a commit that referenced this pull request Jun 12, 2022
* Rewrite initial applet layout to prevent position desync

* Remove comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spacer at the edge of a panel isn't preserved after reboot
2 participants