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

Upgrade tao to gtk4-rs #1051

Open
5 tasks
tweidinger opened this issue Jan 28, 2025 · 3 comments
Open
5 tasks

Upgrade tao to gtk4-rs #1051

tweidinger opened this issue Jan 28, 2025 · 3 comments
Labels
help wanted Help is requested to fix this issue

Comments

@tweidinger
Copy link

We need to upgrade from gtk to gtk4-rs to migrate a unsoundness issue found in glib < 0.2.
Please claim this issue if you want to support or work on this and keep in mind this is a prioritized issue and we try to migrate as soon as possible. If the issue is already assigned to someone you can either reach out with comments or questions reach out for collaboration to the assigned person.

This transition includes:

  • Upgrading gtk to gtk4-rs and handling all errors caused by the dependency change
  • Handle all changes in a backwards compatible way if possible
    • Raise awareness to the working group if breaking changes are required
  • Document migration errors that may be issues in the future or which were complicated to handle
  • Reach out to the working group (alternatively @tweidinger first) if blockers or upstream issues are hit
@tweidinger tweidinger converted this from a draft issue Jan 28, 2025
@tweidinger tweidinger added the help wanted Help is requested to fix this issue label Jan 28, 2025
@Captainpast
Copy link

Previously requests in #134 and #907

@conradhale
Copy link

I would like to help with this. I took a swing at this recently and the main blocker I ran into was related to the removal of X11-specific APIs in GTK4. Most of the removed APIs are related to window positioning. Continuing to support this in tauri seems like it would be tricky, and I personally think its fine to just remove these APIs since X11 isn't that popular anymore.

Some other notable changes:

  • Removal of the widget 'draw' signal, we could support it again through a subclass of GtkWindow
  • Removal of widget event signals, although most of them have replacements
  • GtkContainer API is gone which is used by wry, but we could mimic it with a trait
  • GdkWindow is now called GdkSurface
  • Newer webkitgtk crates that should be able to replace the tauri ones
  • Removal of the glib::Sender api from gtk-rs-core

I can try to get my in-progress code on github this weekend, but in the meantime please share any thoughts/opinions on supporting X11-specific features.

@conradhale
Copy link

conradhale commented Feb 6, 2025

Also webkitgtk recently got support for rendering with skia. As far as I'm aware this wasn't backported to the gtk3 version, so bumping to gtk4 should bring a noticeable performance improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help is requested to fix this issue
Projects
Development

No branches or pull requests

3 participants