Due to the removal of Gdk.Cursor.get_image(), I'm currently unable to come up a suitable solution to retrieve the cursor bitmap. However, there are still few options to choose from:
- Use
Meta.CursorTracker.get_sprite() to get a Cogl.Texture object, then convert it to Gio.BytesIcon. However, the Cogl.Texture object will be the rendered texture rather than the original bitmap (that is to say, it's with the same resolution rendered on your screen).
- Get currently applied cursor theme name and try to get bitmap from theme directories. However the theme name is not always in line with the directory name thus idk if it's even plausible to do such effort. Also, converting from x11 cursor to png requires even further investigations.
If you have suggestions or ideas of other possibilities, feel free to comment below. PRs are always welcomed :)
Due to the removal of
Gdk.Cursor.get_image(), I'm currently unable to come up a suitable solution to retrieve the cursor bitmap. However, there are still few options to choose from:Meta.CursorTracker.get_sprite()to get aCogl.Textureobject, then convert it toGio.BytesIcon. However, theCogl.Textureobject will be the rendered texture rather than the original bitmap (that is to say, it's with the same resolution rendered on your screen).If you have suggestions or ideas of other possibilities, feel free to comment below. PRs are always welcomed :)