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 and related dependencies to 0.18 #1137

Closed
wants to merge 9 commits into from
Closed

Conversation

geluk
Copy link
Contributor

@geluk geluk commented Jul 15, 2024

Description

This PR updates GTK, GDK, and all related dependencies to 0.18.

Additionally, since gtk re-exports gdk, gdk-pixbuf, glib, pango, and cairo, it is possible (and I'd argue preferable) to depend directly on the re-exported versions. This way, we don't have to worry about keeping the versions aligned anymore - Cargo will take care of that. Notably, the re-exported version of gdk-pixbuf was already used everywhere, so it could just be removed without any import changes.

Motivation

I'd love to see eww updated to GTK 4, but I understand that this is complex and time consuming, and while I wouldn't mind assisting, I don't have enough experience with GTK to be of much use.

That said, what I can at least do is get the 0.17->0.18 breaking changes out of the way, and simplify the dependencies a bit to make the eventual migration ever so slightly easier.

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • I used cargo fmt to automatically format all code before committing

@yuki0iq
Copy link

yuki0iq commented Jul 17, 2024

glib-macros dependency is unneeded, as its contents are reexported by glib crate

@geluk
Copy link
Contributor Author

geluk commented Jul 17, 2024

Well spotted, fixed.

@w-lfchen
Copy link
Contributor

w-lfchen commented Jul 30, 2024

cargo wants to add 4 dependencies for some reason when using cargo update:

      Adding gdk-pixbuf-sys v0.20.0
      Adding gio-sys v0.20.0
      Adding glib-sys v0.20.0
      Adding gobject-sys v0.20.0

adding them (specifically, gio-sys, which seems to be required by gdk-pixbuf-sys, adding the other two on their own is fine) breaks dbusmenu-glib:

error[E0277]: the trait bound `menuitem::Menuitem: glib::translate::FromGlibPtrArrayContainerAsVec<_, *mut glib_sys::GList>` is not satisfied

i am at a loss here, do you by any chance have an idea what could be causing this? my only guess is some kind of export
or should i file an issue against the dbusmenu-glib repo?

Copy link
Contributor

@w-lfchen w-lfchen left a comment

Choose a reason for hiding this comment

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

#1144 has been merged, this pr can now be closed

@elkowar
Copy link
Owner

elkowar commented Aug 25, 2024

Thanks a lot for your work, @geluk! closing as this has been included in #1144

@elkowar elkowar closed this Aug 25, 2024
@elkowar
Copy link
Owner

elkowar commented Aug 25, 2024

Regarding GTK4:
I even already had a working build of GTK4 eww a couple of years ago. Sadly, there where some showstoppers that I don't think have been fully resolved yet, especially regarding wayland compatibility (GTK4 makes rendering on layershell surfaces a lot more complex, and back then it was fully impossible), as well as some other larger architectural changes that affected eww quite negatively. I don't have any concrete plans on when to retry a GTK4 migration currently, as I think most of the features GTK4 adds don't really affect eww directly.

@geluk geluk deleted the gtk-18 branch August 25, 2024 19:51
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.

4 participants