Skip to content

Fix object mask cursor indicator leaking under overlay windows#21099

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:fix_obj_mask_cursor_on_pref
May 23, 2026
Merged

Fix object mask cursor indicator leaking under overlay windows#21099
TurboGit merged 1 commit into
darktable-org:masterfrom
andriiryzhkov:fix_obj_mask_cursor_on_pref

Conversation

@andriiryzhkov
Copy link
Copy Markdown
Collaborator

If you're in the object mask creation mode and you open preferences (or any other window) over the darkroom without leaving the mask tool, the mask's "+" cursor indicator keeps tracking the cursor underneath the overlay – you can see it moving on the darkroom behind the prefs window as you move the mouse over the prefs widgets.

Root cause: the mask tool's post-expose handler calls gdk_window_get_device_position() every redraw to figure out where to draw the indicator. That function returns the pointer's coordinates relative to the darkroom window regardless of which window the cursor is actually over, so as long as the coordinates land inside the canvas bounds, the indicator gets drawn there – even when the cursor is visually somewhere else.

Fix: also ask gdk_device_get_window_at_position() which window the pointer is actually over, and skip the indicator if it's not the darkroom canvas.

@andriiryzhkov andriiryzhkov added bugfix pull request fixing a bug scope: AI features AI features related issues and PR labels May 22, 2026
@andriiryzhkov andriiryzhkov added this to the 5.6 milestone May 22, 2026
Copy link
Copy Markdown
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@TurboGit TurboGit merged commit 635c0c5 into darktable-org:master May 23, 2026
5 checks passed
@andriiryzhkov andriiryzhkov deleted the fix_obj_mask_cursor_on_pref branch May 23, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug scope: AI features AI features related issues and PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants