Repository navigation
Show the mouse cursor widgets ask for - #594
Merged
Merged
Conversation
The OpenGL controller never carried ImGui's requested cursor to the window, so every resize, hand and text-beam cursor was dropped. PlatformCursor now applies it after each frame, the backend advertises HasMouseCursors, and the custom widgets that lacked one set a hand on click targets and resize or move cursors on drag targets. The headless harness exposes the frame's cursor so the widget suites assert each one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UkEDGUXpnDhgpb3k1t2Kyb
|
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Requested by Matt · project thread
Before: the pointer was an arrow everywhere in an ImGuiApp window. Splitters, window edges, text fields and every custom widget showed the same arrow, even where ImGui or Hexa had already asked for a resize or text cursor.
After: the pointer changes with what a press will do. Text fields show a beam, splitters and window edges show resize arrows, click targets such as switches, chips, segments, stars, piano keys, step cells and page dots show a hand, and drag targets show a resize or move cursor (range slider, handle track, fader, knob, XY pad, colour wheel, curve points, canvas panning).
The root cause was in
ImGui.App, not the widgets: Dear ImGui only records the cursor a frame wants, and the OpenGL controller never passed it on to the window.How: a new
PlatformCursormapsImGui.GetMouseCursor()onto Silk.NET'sICursorafter each frame, writing only on change, and leaves alone a pointer the app has captured or hidden,NoMouseCursorChange, andMouseDrawCursor. The controller now declaresImGuiBackendFlags.HasMouseCursors, which also turns on ImGui's resize-from-window-edges. InImGui.Widgets, a smallWidgetCursor.OnLastItemhelper sets the cursor on the widgets that lacked one. Plain buttons, includingToolbarButton, keep the arrow, as ImGui's own buttons do, and so do read-only or click-less instances. The headless harness declares the same flag and exposesImGuiAppHarness.MouseCursor, so each widget's cursor is asserted in its isolation suite (25 new UI tests), with unit tests for the mapping. CLAUDE.md and the App README describe the policy.Every test project passes locally in Release.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UkEDGUXpnDhgpb3k1t2Kyb
Generated by Claude Code