Igalia / cog

WPE launcher and webapp container
MIT License
236 stars 61 forks source link

No cursor change on links / buttons and other problems #594

Open ancorgs opened 1 year ago

ancorgs commented 1 year ago

We are building a Linux installer with web interface that will hopefully become the default installer for the next generation of openSUSE and SUSE distributions.

To enable local installation (ie. traditional Linux installation experience), we are creating a demo live system that automatically opens a browser in full screen. Cog sounds perfect for that, but we have found some problems. Let's start with the main one, illustrated in the following video.

https://github.com/Igalia/cog/assets/3638289/fcf7cbd4-8b72-4834-a466-c8ae35e7937f

As you can see, the cursor doesn't change when we run the mouse over a clickable element. That's quite a show stopper from an usability point of view.

In the same video you can also see another problem which is basically the one reported at #327 (no handler for input type=file).

You can try it yourself using this ISO: agama-live-weston-cog.x86_64-openSUSE.iso in any real or virtual machine.

In the ISO we use Cog directly on top of Weston, but we have observed the same issue with other compositors as well (eg. on top of a Gnome Wayland session).

Anything we can do to have a more reactive cursor?

Just since I also mentioned #327, any guidance on how to handle file inputs in our case?

ancorgs commented 1 year ago

Unless I'm mistaken and following a red herring, it looks like this is the code rendering the cursor on Wayland.

https://github.com/Igalia/cog/blob/master/platform/wayland/cog-platform-wl.c#L853 (Originally introduced at https://github.com/Igalia/cog/pull/194).

There is a comment there stating that the mouse cursor will not have the appropriate size in HiDPI. So I guess the lack of a hover icon would not be the only problem with cursors in Wayland.

Pinging @aperezdc since I see he is the main author of all that. What's the status regarding mouse cursor hover on one hand and regarding HiDPI on other hand?