Skip to content

Conversation

DaPigGuy
Copy link
Contributor

@DaPigGuy DaPigGuy commented Mar 18, 2025

Description

Adjusted usage of MetaCursor enum for changes that were merged last minute in GNOME 48. Additionally, cleaned up GNOME shell version compatability methods to make this change easier.

upstream gnome PR ref: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3622

Fixes #350

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • My commits follow the commit standards of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

@DaPigGuy DaPigGuy mentioned this pull request Mar 18, 2025
@DaPigGuy DaPigGuy changed the title Fix/gnome 48 Adjust to MetaCursor changes in GNOME 48 Mar 18, 2025
@Totto16
Copy link
Collaborator

Totto16 commented Mar 18, 2025

Thanks for this, as even the unofficial docs of Meta don't have this (https://gjs-docs.gnome.org/meta16~16/meta.cursor) , but the PR that added this into gnome 48 was really late xD

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3622

@Totto16
Copy link
Collaborator

Totto16 commented Mar 18, 2025

I changed a few minor things in both commits:

In the first, make the retrieval of the gnome version safer, don't use map, but reduce, so that non-numbers get removed from the final array. Upstream guarantees, that this string is a valid version number, but we newer know, so there are explicit error messages, that are printed, when this unlikely scenario happens

In the second commit, I uses javascript checks instead of gnome version checks, as this is preferred, if we have the option, the gnome version check is only done in 1 place, where we need to, in all other places w check for features, even if we know the version it was introduced. This is due to the fact, that that is much more robust and support all versions, even gnome-48 beta before this change.

Feel free to suggest changes, if you are not happy with mine :)

@DaPigGuy
Copy link
Contributor Author

Feel free to merge

@Totto16 Totto16 merged commit b4e483b into oae:master Mar 20, 2025
1 check passed
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.

Gnome 48 support II

2 participants