ii8 / havoc

minimal terminal emulator for wayland
Other
108 stars 18 forks source link

Havoc won't display system cursor. #44

Closed ghost closed 1 year ago

ghost commented 1 year ago

At first I thought this was a problem with my system (as in I didn't have any cursor theme installed), then I installed one (Vanilla-DMZ) but the problem was still happening and it only occurs while hovering over Havoc, after leaving the cursor it returns to normal.

If this is intentional, please allow a way to configure this on havoc.cfg as it confuses me while I am on my workflow. By the way, this project is amazing and I am very happy to use it!

Relevant information: OS: FreeBSD Compositor: Sway Compiled using the ports system from FreeBSD.

ii8 commented 1 year ago

I'm glad you like it!

It is not intentional. How did you install the cursor theme? I don't have FreeBSD so I'm not sure how much I'll be able to help, but what's important is that the libwayland-cursor library knows about the cursor theme.

Also see #21

ghost commented 1 year ago

Hello again! This seems to indeed fix my problem (partially) as it works with some cursors themes (I've tried two, Adwaita and redglass), Adwaita successfully works but redglass does not. I think it's due to redglass not having an I-Beam cursor icon (I think this could be the reason as to why when there is no cursor theme installed, no system cursor is present).

I think the default should be to use the normal cursor icon when I-Beam is not provided. Also I've installed all of the cursor icons using pkg, package manager for FreeBSD.

ii8 commented 1 year ago

Hm, using the default cursor doesn't help when there is no theme configured, idk why libwayland-cursor just doesn't give anything when things aren't configured perfectly. It seems a bit dumb for havoc to ship it's own fallback cursor. I'll have to figure out what the proper solution is here.

ghost commented 1 year ago

It might be useful to create an issue in libwayland-cursor, this should not be intended behavior at all. It is probably a bug.

ii8 commented 1 year ago

Try it with 3a1c9716709919026e7f5763450dae25d069d25e

The problem was that some cursor themes, including the fallback theme from libwayland-cursor, have different non-standard names for the cursors. This should fix redglass as well I think.

ghost commented 1 year ago

Seems to work perfectly with the new commit! Here's a screenshot of Havoc with neovim open: 20230201_23h02m54s_grim

I will be closing this issue now. Thank you very much!

Consolatis commented 1 year ago

The problem was that some cursor themes, including the fallback theme from libwayland-cursor, have different non-standard names for the cursors. This should fix redglass as well I think.

See https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3651 for a generic fix in wlroots regarding the same issue.

So if somebody wants to fix this upstream: the same / similar changes could be applied to libwayland but I currently have too much on my plate to do it myself.