Skip to content

gtk4-prep: restore motion events to widgets with motion controllers - #21784

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
Arecsu:gtk4/fix-culling-overlay-motion
Aug 10, 2026
Merged

gtk4-prep: restore motion events to widgets with motion controllers#21784
TurboGit merged 1 commit into
darktable-org:masterfrom
Arecsu:gtk4/fix-culling-overlay-motion

Conversation

@Arecsu

@Arecsu Arecsu commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #21782 — in culling, the rating overlay no longer reappeared when moving the mouse after its timeout; only losing and regaining window focus brought it back.

This was a regression from the event-signal → event-controller conversion (#21659). The GTK3 bridge dt_gui_connect_motion() added only the enter/leave event masks to the widget, not the pointer-motion mask. GTK3 event controllers don't request input from GDK themselves, so the thumbnail motion handlers never fired over the event-box-based thumb widgets — motion went to the parent layout instead. Enter/leave still worked, which is why moving the pointer out of the window and back in (a crossing) did bring the overlay back.

The fix restores the pointer-motion mask on every widget with a motion controller, as 5.6 did. The other controller helpers were checked: scroll controllers request their own mask, and click/drag gestures land on drawing-area/event-box widgets that request button events by default — no other spot needs the same change.

Related: #15920 #20433

The GTK3 bridge for GtkEventControllerMotion only added the enter/leave
event masks to the widget, not the pointer-motion mask.  GTK3 event
controllers don't request input events from GDK themselves (the motion
controller's event mask is 0), so widgets with a motion controller never
received motion events over event-box-based child widgets -- e.g. the
thumbnail hover handlers, which re-show the block overlay after its
timeout, so the culling overlay did not reappear on mouse move (fixes
darktable-org#21782).  Restore the pointer-motion mask as 5.6 did.

The other controller helpers were audited: scroll controllers request
their own mask, and click/drag gestures land on drawing-area/event-box
widgets that request button events by default.

Related: darktable-org#21782 darktable-org#15920 darktable-org#20433
@wpferguson

Copy link
Copy Markdown
Member

Works for me, thanks @Arecsu

@wpferguson wpferguson added bugfix pull request fixing a bug gtk4 labels Aug 10, 2026
@TurboGit TurboGit added this to the 5.8 milestone Aug 10, 2026

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

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 c877910 into darktable-org:master Aug 10, 2026
5 checks passed
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 gtk4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Culling overlay regression

3 participants