Skip to content

Mouse cursor invisible over canvas when Move Selected Pixels tool is active (NVIDIA/X11/GTK4) #2182

Description

@linuxlite

Mouse cursor invisible over canvas when Move Selected Pixels tool is active (NVIDIA/X11/GTK4)

Description

When using the Move Selected Pixels tool, the mouse cursor becomes completely invisible over the canvas. All other tools display the cursor correctly.

Steps to Reproduce

  1. Launch Pinta on Linux with NVIDIA GPU and X11
  2. Open or create an image
  3. Select the Move Selected Pixels tool (M)
  4. Move the mouse over the canvas

Expected Behaviour

Cursor should be visible over the canvas.

Actual Behaviour

Cursor is completely invisible over the canvas. It reappears when moving off the canvas onto other UI elements.

Environment

  • Pinta 3.1.2 (built from source)
  • GTK4 4.22.2
  • GPU: NVIDIA GeForce RTX 5060 Ti
  • Driver: 595.71.05
  • DE: XFCE / X11
  • OS: Linux Lite 8.0 (Ubuntu 26.04)

Root Cause

In Pinta.Tools/Tools/MoveSelectedTool.cs, DefaultCursor is defined as:

public override Gdk.Cursor DefaultCursor => Gdk.Cursor.NewFromTexture (Resources.GetIcon (Pinta.Resources.Icons.ToolMoveCursor), 0, 0, null);

The null fallback cursor passed to NewFromTexture causes GTK4 to render an invisible cursor on NVIDIA/X11, where the hardware cursor plane cannot composite a custom texture cursor without a valid fallback.

Fix

Replace null with Gdk.Cursor.NewFromName("default", null) as the fallback:

public override Gdk.Cursor DefaultCursor => Gdk.Cursor.NewFromTexture (Resources.GetIcon (Pinta.Resources.Icons.ToolMoveCursor), 0, 0, Gdk.Cursor.NewFromName ("default", null));

This should also be audited across all other tools that pass null as the fallback to NewFromTexture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolsGeneral issues related to tools

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions