Skip to content

SystemCursor not correct working on Linux #102

Description

@exepta

Hi, I encountered a bug and wanted to ask if it's already been resolved. The following is the issue:

In Windows 11, I can use the system cursor normally, for example, when hovering. However, when I try it on Linux Arch (Cachy OS), nothing happens. It's the same code as on Windows. Here's an excerpt:

   pub fn new(index: usize, asset: Handle<Image>, space: f32, size: f32, toolbar_width: f32, toolbar_height: f32) -> Self {
        let total_width = 3.0 * space;
        let start_x = (toolbar_width - total_width) / 2.0;

        let x_offset = start_x + (index as f32 * space);
        let y_offset = (toolbar_height - size) / 2.0;

        Self {
            name: Name::new(format!("Icon-{}", index)),
            ui_layout: UiLayout::boundary()
                .pos1((Rl(100.0) - Ab(300.0) + Ab(x_offset), Ab(0.0) + Ab(y_offset)))
                .pos2((Rl(100.0) - Ab(300.0) + Ab(x_offset + size), Ab(y_offset + size)))
                .pack(),
            ui_color: UiColor::new(vec![
                (UiBase::id(), Color::srgb(1.0, 1.0, 1.0).with_alpha(1.0)),
                (UiHover::id(), Color::srgb(0.8, 0.8, 0.8).with_alpha(1.0)),
            ]),
            sprite: Sprite::from(asset),
            layer: RenderLayers::layer(2),
            on_hover_set_cursor: OnHoverSetCursor::new(SystemCursorIcon::Pointer),
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions