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
- Launch Pinta on Linux with NVIDIA GPU and X11
- Open or create an image
- Select the Move Selected Pixels tool (M)
- 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.
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
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
Root Cause
In
Pinta.Tools/Tools/MoveSelectedTool.cs,DefaultCursoris defined as:The
nullfallback cursor passed toNewFromTexturecauses 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
nullwithGdk.Cursor.NewFromName("default", null)as the fallback:This should also be audited across all other tools that pass
nullas the fallback toNewFromTexture.