Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Mouse cursor changes theme when over the alacritty window #21

Open
chasinglogic opened this issue Apr 30, 2024 · 9 comments
Open
Labels
bug Something isn't working

Comments

@chasinglogic
Copy link

Describe the bug

My mouse cursor changes to a weird default white one when over the Alacritty window. This does not happen with other snaps installed on the system like Firefox.

To Reproduce

Steps to reproduce the behavior:

  1. Open the Alacritty snap on Ubuntu 24.04 default desktop
  2. Move the mouse cursor over the Alacritty window
  3. Observe that the cursor changes from the black with white outline default theme to an all white cursor with a different shape

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Screencast.from.2024-04-30.18-03-47.webm

Environment (please complete the following information):

  • OS: Ubuntu 24.04 LTS
  • Alacritty Version: 0.13.2
  • Graphics Cards: Intel integrated graphics
@chasinglogic chasinglogic added the bug Something isn't working label Apr 30, 2024
@pedro-avalos
Copy link

This is also probably related to this issue. I noticed that if I open nautilus from Alacritty, the accent color of the opened file explorer is the default one, not the one I have configured on my settings.

@pedro-avalos
Copy link

I'm not sure if the nautilus issue I experience is related. That may need to be a separate issue (if it is one). I think the issue with the mouse cursor has to do with the following line of the wrapper:

unset XCURSOR_PATH

I think the wrapper is "undoing" what bin/desktop-launch from snapcraft-desktop-helpers does to allow snaps to match the user theme...

I see that it is being unset to allow for a user to manually set their preferred themes, but (if this is what is causing the mouse issue for normal usage) I think that is an issue to fix upstream in snapcraft-desktop-helpers. Perhaps the custom values that the desktop-launch wrapper uses should be appended (since the environment variable is a list, from my understanding).

@pedro-avalos
Copy link

A temporary fix, @chasinglogic (and anyone else who is bothered by this), is to set the XCURSOR_THEME variable before launching Alacritty. You can do this by using XCURSOR_THEME=Yaru alacritty (or whichever theme you are using from /usr/share/icons or ~/.local/share/icons. This is case sensitive) to launch the application. This variable is not overwritten by the wrappers. To be able to apply this change to the application when opening it through the desktop launcher / icon, you'd need to similarly edit the .desktop file's Exec=... line.

@aftuw
Copy link

aftuw commented Aug 7, 2024

This change breaks the cursors on my system (see #29 (comment) ).
Maybe this is an issue how the XCURSOR_PATH is determined by the snapcraft-desktop-helpers package?
However, I don't know how to fix.

@jnsgruk
Copy link
Member

jnsgruk commented Aug 7, 2024

@JamesH - sorry for the ping - any ideas on this one?

@aftuw
Copy link

aftuw commented Aug 7, 2024

It seems like this line from snapcraft-desktop-helpers is causing me issues: https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/common/desktop-exports#L77 ,
which sets the XCURSOR_PATH incorrectly (it should be /usr/share/icons).
Additonally, before the change it also doesn't respect the chosen cursor theme, but defaults to Adawaita (which was my default, so I didn't notice before).

@jnsgruk
Copy link
Member

jnsgruk commented Aug 7, 2024

@kenvandine is this something you're able to look at?

@kenvandine
Copy link

This change breaks the cursors on my system (see #29 (comment) ). Maybe this is an issue how the XCURSOR_PATH is determined by the snapcraft-desktop-helpers package? However, I don't know how to fix.

With the fix merged in #29 I can't reproduce the original issue and the cursor does seem to do the right thing for me. I'm on a pretty stock 24.04 system with the default theme. @aftuw what is your setup like?

@aftuw
Copy link

aftuw commented Aug 8, 2024

I am using Ubuntu 22.04 with KDE (Kubuntu).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants