Skip to content

Cursor Icon Regression on GNOME #425

Closed

Description

@Friz64

Description

The cursor icon refuses to change when hovering over the window's borders. When actively resizing, it changes to the correct icon, but goes back to its previous state after. Inside the window, it retains its previous state, even from other windows.

Offending Pull Request: #380 (cc @kchibisov)

Screencast.from.2023-10-30.04-28-39.webm

This issue can also be observed in winit.

I am running GNOME 45.0 on Arch Linux. I also tested KDE Plasma in a VM and it worked fine there.

I'll be glad to do more testing regarding this issue.

Before (for comparison)

Click to expand
Screencast.from.2023-10-30.04-27-48.webm

Activity

  1. Friz64 commented on Oct 30, 2023

    @Friz64
    ContributorAuthor

    Looks like in the themed_window example, the result of smithay_client_toolkit::seat::pointer::ThemedPointer::set_cursor is ignored, yet every call to it returns PointerThemeError::CursorNotFound.

  2. Friz64 commented on Oct 30, 2023

    @Friz64
    ContributorAuthor

    Looks like get_cursor expects a cursor icon name like bottom_left_corner (which it got in the previous version, and which still works when temporarily testing on latest master) but now receives a name like sw-resize through icon.name().

    let cursor = themes
    .get_cursor(conn, icon.name(), scale as u32, &self.shm)
    .map_err(PointerThemeError::InvalidId)?
    .ok_or(PointerThemeError::CursorNotFound)?;

  3. kchibisov commented on Oct 30, 2023

    @kchibisov
    Member
  4. Friz64 commented on Oct 30, 2023

    @Friz64
    ContributorAuthor

    Huh, indeed, when using the default Adwaita cursor theme it works as expected.

    Would it be beneficial to fall back to legacy cursor icon names to accommodate users with outdated cursor themes? I would be open to making a Pull Request for this.

  5. kchibisov commented on Oct 30, 2023

    @kchibisov
    Member

    Or we can try to update legacy themes while at it. The future users won't be affected by that anyway due to cursor-shape-v1. It's not like adding a symlink inside the theme will hurt anyone.

  6. kchibisov commented on Oct 30, 2023

    @kchibisov
    Member

    You can also try to add alternative cursor names to https://github.com/rust-windowing/cursor-icon/ , but I'd sort of prefer to get themes patched as well.

  7. Friz64 commented on Oct 30, 2023

    @Friz64
    ContributorAuthor

    Of course patching themes would be the best solution, but it is not realistic. In the best case users get their cursor themes from the package manager, but I don't believe there will be a big effort to update them all. In the worst case cursor themes are downloaded from random websites, good luck updating any of these.

    Yes, I guess this can be worked around by symlinks, but the average user won't know this. They won't even know what is causing the problem.

    You can also try to add alternative cursor names to https://github.com/rust-windowing/cursor-icon/

    How should the API for this work? Older winit versions seem to have already had some kind of "fallback" system, where in some cases multiple cursors are tried until one works. See

    https://github.com/rust-windowing/winit/blob/2ebbfab6a47f93f76841553dcb3cc53683e4955c/src/platform_impl/linux/wayland/seat/pointer/mod.rs#L78-L126

  8. kchibisov commented on Oct 30, 2023

    @kchibisov
    Member
    /// Alternative names sometimes used to refer to this icon.
    fn alt_names(&self) -> &[&'static str]
  9. Friz64 commented on Oct 30, 2023

    @Friz64
    ContributorAuthor

    Opened a PR: rust-windowing/cursor-icon#11

    I will also make a PR for this repository utilizing the new method so it can be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions