Adjust to MetaCursor changes in GNOME 48#352
Conversation
|
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 |
Needing to pass every version in existence is a needless maintenance burden, so don't.
|
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 :) |
|
Feel free to merge |
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
Checklist