Open HaoliangXu opened 4 months ago
I found that it's mutter, a Wayland display server used by GNOME. mutter doesn't support WpCursorShapeManagerV1. So SCTK (depended by floem-winit) can only render cursor icon with legacy method. Coincidentally, mutter-46.0-ubuntu lost support for X11 cursor themes. And because Wayland_cursor::CursorTheme.fallback is "None", fallback cursor doesn't work either. That's why Lapce failed to set cursor to any shape.
However, I still can't find out why all other applications work alright.
I read the source code of Zed editor. When WpCursorShapeManagerV1 is not supported, instead of only reading XCURSOR_THEME from env, Zed also receives events from ashpd that provide current cursor theme, including real-time theme changes. That's why mouse works fine in Zed. I think other applications should be the same. Is there any way for Lapce to use ashpd also? Because I see it's in dependency tree.
If we bump winit to a newer version, the cursor will work but in a different theme("default" theme). I guess we need to add dbus access to floem to get the theme name from system.
Lapce Version
Latest version of both channels (Release, Nightly)
System information
Ubuntu 24.04
Describe the bug
Mouse pointer doesn't change icon on Lapce window. Sometime it doesn't even show up. Setting XCURSOR_THEME to a theme name works. But it should work without XCURSOR_THEME like other applications.
Additional information
Here's part of the log file: