-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Replaced Clutter.Image with St.ImageContent (fixes GNOME 48) #261
base: version-51
Are you sure you want to change the base?
Replaced Clutter.Image with St.ImageContent (fixes GNOME 48) #261
Conversation
Unfortunately, while this worked for a short while, this was changed in st/image-content: Take a CoglContext on set_bytes/set_data functions so that St.ImageContent now requires a Cogl.Context parameter, and I can't find an example how to do this. EDIT: An explanation: They've removed Clutter.Image in Gnome 48, and the instructions clearly state that extensions should use St.ImageContent in it's place, which worked right out of the box when I tried it - and it will work for Gnome 45 to 47. Unfortunately, the latest update to Gnome 48 beta (which I got early from Arch Gnome-Unstable repo) changed St.ImageContent in Gnome48 to require CoglContext as a parameter - breaking the previous compatibility. |
OK, found out how to get the context - but I think that this means that there will have to be a new version of the extension for Gnome 48 - because St.ImageContent now takes Cogl.Context, which it didn't in Gnome 45 to 47. So, given that - changed the target branch to version-51. Maybe the new release could cover both 45-47 and 48, but this call to instantiate a new instance of St.ImageContent will differ for 45 to 57 and 48. |
99c3842
to
da6aa2e
Compare
Looks good so far, let me know when you think it's ready to merge. Looks like we are pretty good for GNOME 48 other than this issue. |
I've not actually tested this PR yet, sorry. Is the work around required, the porting guide suggests that it isn't for GNOME 45+. https://gjs.guide/extensions/upgrading/gnome-shell-48.html#clutter-image |
The workaround is needed (if I'm not missing something obvious) if you'd like the extension to work for 45-47 and 48 at the same time in the next version. Clutter.Image or St.ImageContent - doesn't matter - there will have to be a version check. This just uses St.ImageContent since that way most of the code can be shared between the versions - i.e. the guide doesn't take into account that GNOME 48 broke the compatibility with the previous versions - if it didn't, you could've just replaced Clutter.Image with St.ImageContent (like I did in the first iteration) and call it a day. |
According to https://gitlab.gnome.org/jrahmatzadeh/gjs-guide/-/commit/b150648e7ad460a9cff3afeecdbdb6b8d17550ab, Clutter.Image will not work in GNOME 48 - replaced it with St.ImageContent, recommended by the porting guide. This is backwards compatible with GNOME Shell 45 and higher.