mechtifs / wiggle

Gnome extension that magnifies the cursor when the mouse is moved rapidly.
GNU General Public License v2.0
26 stars 1 forks source link

Use system cursor when possible #1

Open mechtifs opened 8 months ago

mechtifs commented 8 months ago

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:

  1. 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).
  2. 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 :)

Doomsdayrs commented 8 months ago

Consider an XDG protocol for this?

https://flatpak.github.io/xdg-desktop-portal/

mechtifs commented 7 months ago

Consider an XDG protocol for this?

Sadly I can't seem to find any API that could help get the bitmap. If I missed something, feel free to point me out!
Anyway, thanks for your reply :)

Doomsdayrs commented 7 months ago

Consider an XDG protocol for this?

Sadly I can't seem to find any API that could help get the bitmap. If I missed something, feel free to point me out! Anyway, thanks for your reply :)

Not an existing API, but proposing one to them!