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

Update GTK-related crates, replace GLib channels with Tokio channels, refactor Tokio runtime code #380

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

JakeStanger
Copy link
Owner

@JakeStanger JakeStanger commented Dec 17, 2023

This is a major refactor which updates GTK, GLib and GTK Layer Shell to their latest versions.

GLib channels, previously used for receiving events on the GLib Main Context thread have been deprecated and a new method for running Futures on the main thread has been added instead. This commit also replaces all the deprecated code with this.

As part of the above, a bug was uncovered related to creating the GLib main context inside the Tokio runtime. Spawning of Tokio tasks has been refactored to fix this.


This change means async code and GObjects can now co-exist, which simplifies a lot of the message passing, opening the gates to more refactoring to simplify code, and hopefully will make weird issues with channels less likely. In turn, this should help unlock a fix for some outstanding issues (cough #291).

@JakeStanger JakeStanger force-pushed the refactor/update-gtk branch 3 times, most recently from be4ff06 to 7e418ff Compare December 18, 2023 21:44
This is a major refactor which updates GTK, GLib and GTK Layer Shell to their latest versions.

GLib channels, previously used for receiving events on the GLib Main Context thread have been deprecated and a new method for running Futures on the main thread has been added instead. This commit also replaces all the deprecated code with this.

As part of the above, a bug was uncovered related to creating the GLib main context inside the Tokio runtime. Spawning of Tokio tasks has been refactored to fix this.
@JakeStanger JakeStanger merged commit 29eeefb into master Dec 18, 2023
3 checks passed
@JakeStanger JakeStanger deleted the refactor/update-gtk branch December 31, 2023 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant