atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.88k stars 413 forks source link

CSS cursor property not working #3062

Closed hgluka closed 1 year ago

hgluka commented 1 year ago

This might be an issue with my system, but the change introduced in 418276a to fix #3054 doesn't seem to be working. Then, to confirm, I tested the different cursors on this page: https://www.w3schools.com/cssref/tryit.php?filename=trycss_cursor and found out that a lot of them don't work, including pointer.

Steps to reproduce are:

  1. Visit https://www.w3schools.com/cssref/tryit.php?filename=trycss_cursor
  2. Hover over different words in the right pane.
  3. The cursor should be different for each word. If not, you have reproduced the issue.

cc @jmercouris

My show-system-information output:

Nyxt version: 4
Renderer: GI-GTK
Operating system kernel: Linux 6.2.6-76060206-generic
Lisp implementation: SBCL 2.3.5 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-4 :CLIPBOARD-CONTENT-METHOD :FAST-IO-SV :FAST-IO :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS :FSET-EXT-STRINGS :NAMED-READTABLES :GLOBAL-VARS :SWANK :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CL-PPCRE :CHUNGA :FLEXI-STREAMS :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS :WEBKIT2 :WEBKIT-2.40.2 :WEBKIT-2.40 :WEBKIT-2 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF :CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :ASDF-SYSTEM-CONNECTIONS :CL-JSON-CLOS :CL-JSON :THREAD-SUPPORT :QUICKLISP :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.5
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY USER-SOURCE-REGISTRY USER-SOURCE-REGISTRY-DIRECTORY DEFAULT-USER-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY-DIRECTORY DEFAULT-SYSTEM-SOURCE-REGISTRY)
Critical dependencies: (/gnu/store/wgmz1r19kp8y5x4vwnbkrc8pnfa5w8jr-cl-cffi-gtk-3.8.8-3.1700fe6/share/common-lisp/source/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /gnu/store/jsilfnh8ay8cn3jxvr9h7hvcwl19v2db-cl-gobject-introspection-0.3-1.d0136c8/share/common-lisp/source/cl-gobject-introspection/cl-gobject-introspection.asd /gnu/store/xa2hfcclwkhcpdc5bshna707z46nja22-cl-webkit-3.5.9/share/common-lisp/source/cl-webkit/webkit2/cl-webkit2.asd)

Quicklisp dist version: 2023-02-15
Quicklisp client version: 2021-02-13
Local project directories: (/home/hgluka/quicklisp/local-projects/)
Critical dependencies(#<SYSTEM cl-cffi-gtk / cl-cffi-gtk-20230214-git / quicklisp 2023-02-15> #<SYSTEM cl-gobject-introspection / cl-gobject-introspection-20230214-git / quicklisp 2023-02-15> #<SYSTEM cl-webkit2 / cl-webkit-20230214-git / quicklisp 2023-02-15>)

Guix version: b94cbbbce70f59b795526a0ed305facf041e6faa
jmercouris commented 1 year ago

If the cursor doesn't change in general, then it is not related to the changes I made :-D

hgluka commented 1 year ago

Yes, I meant that I noticed the larger issue while testing your change. Sorry for the confusion :D

Mostly I'm wondering if someone can reproduce it or if it has something to do with my setup.

aartaka commented 1 year ago

Yes, I can reproduce it. I wonder whether it's DE/WM/GTK to blame for missing some cursor icons 🤔

aadcg commented 1 year ago

I can't reproduce on EXWM.

hgluka commented 1 year ago

I don't know if it's relevant, but I don't have the issue in other browsers (with the same DE - Gnome 42.5).

I'll test it out tomorrow on my laptop with CWM.

hgluka commented 1 year ago

Ah, so the issue is with Guix on a foreign distro. Guix needs some environment variables to be set, and systemd (in my case) doesn't set them. Here is a similar issue with the Emacs package: https://issues.guix.gnu.org/53379 So the problem isn't Nyxt specific.

To get the proper cursor theme, I put EXPORT XCURSOR_PATH='/usr/share/icons' in my .zshrc (and also changed my sly config to preserve the value) and it works perfectly. @aartaka let me know if that fixes it for you as well.

jmercouris commented 1 year ago

Artyom is running Guix as an OS, so I suspect the problem is slightly different! A good start perhaps!

aadcg commented 1 year ago

Good investigation @hgluka!

aartaka commented 1 year ago

To get the proper cursor theme, I put EXPORT XCURSOR_PATH='/usr/share/icons' in my .zshrc (and also changed my sly config to preserve the value) and it works perfectly.

I cannot easily test it right now, so let's settle on explaining it with my desktop environment deficiency 😛

hgluka commented 1 year ago

It very well could be a DE issue. There is this part of the Arch Wiki (neither one of us is using Arch, but still) that points in that direction.

aadcg commented 1 year ago

I believe we can close this one for now. I wonder if we should add a small note on the manual about this env var.

hgluka commented 1 year ago

Sorry, I totally forgot to follow up on this. Should I close the issue now or wait and see about adding that note to the manual?

I don't know what the criteria is for that. There isn't a lot of stuff in the Troubleshooting section.

aadcg commented 1 year ago

I can imagine arguments both for and against adding a note about it in the manual. We'll do it as you find most reasonable @hgluka. What do you say?

hgluka commented 1 year ago

Well, if it really is DE/WM related, then it could be affecting lots of users (even if they don't notice). I'd say we should add a note for that reason. Plus, the fix is pretty simple and harmless. I can make a PR for it.