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

Cursor changes size when moving #1577

Open
GrabbenD opened this issue Feb 19, 2023 · 7 comments
Open

Cursor changes size when moving #1577

GrabbenD opened this issue Feb 19, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@GrabbenD
Copy link

GrabbenD commented Feb 19, 2023

Setup

  • I've configured GTK to use Bibata cursors theme.
  • No XWayland.
  • NVIDIA GPU.

Issue

When you move the cursor on the desktop or just inside of a application like Brave or VSCodium it shrinks and expands by about 2px. To clarify, you don't have to move it between applications to notice this as it's happening continuously.

I'm having a hard time finding the culprit of this issue but some users suggests it's due to fractional scaling of bitmap icons?

Config

I'm using NixOS and just using this option sets the cursor options globally without having to use exec-once=hyprctl setcursor Bibata-Modern-Ice 22 or any other configuration:

home.pointerCursor = {
  gtk.enable = true;
  package = pkgs.bibata-cursors;
  name = "Bibata-Modern-Ice";
  size = 22;
};

For reference, if you configure the cursor with a alternative approach you get the same result:

Example
# hyprland.conf
exec-once=hyprctl setcursor Bibata-Modern-Ice 22

With:

# .nix
gtk = {
  enable = true;
  cursorTheme = {
    package = pkgs.bibata-cursors;
    name = "Bibata-Modern-Ice";
    size = 22;
  };
};
@GrabbenD GrabbenD added the bug Something isn't working label Feb 19, 2023
@GrabbenD
Copy link
Author

I've confirmed that this issue doesn't happen unless you use a cursor theme

@vaxerski
Copy link
Member

unless the cursor is above nothing (the Hyprland logo background) the image is set by the application. This would suggest it's the app misbehaving.

@GrabbenD
Copy link
Author

GrabbenD commented Feb 19, 2023

@vaxerski I made a video demonstration with wf-recorder of the desktop. I'm not sure if the cursor is technically above my foot terminal since I toggled float, it behaves the same way if I move to another workspace. The resizing of the cursor happens even if no applications are running:

recording.mp4

Edit: If the above video doesn't load try this link: https://streamable.com/39xozb

@GrabbenD
Copy link
Author

I've noticed the resizing doesn't happen if I move the mouse perfectly horizontally (by sliding it left/right on top of the screen) or perfectly vertically (by sliding it up and down at the edge of the screen). It's easiest to spot if the curse moves diagonally or in circles. This is extremely noticeable when moving the mouse between multiple applications like Brave browser and VSCodium

@vaxerski
Copy link
Member

I may be blind, but can't see your cursor changing size in the video.

@GrabbenD
Copy link
Author

GrabbenD commented Feb 19, 2023

@vaxerski I believe I found the culprit of this issue!

There is a shadow underneath the cursor. If I move it in circles on the desktop the shadow changes position which makes it look like the cursor is shrinking (Bibata-Modern-Ice):
28px
vs
27px

If we compare this against Bibata-Original-Ice, cursor's borders becomes thicker depending on how dark the background is:
classic1
vs
classic2

I'm on a HIDPI 10 bit display and this subtle difference makes the cursor look like it's shrinking and expanding.

Not sure if we can do anything about this other than using a cursor without borders/shadow?

@vaxerski
Copy link
Member

don't think we can.

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

2 participants