lighttable: don't let a cancelled gesture re-select the hovered image - #21825
Closed
Arecsu wants to merge 1 commit into
Closed
lighttable: don't let a cancelled gesture re-select the hovered image#21825Arecsu wants to merge 1 commit into
Arecsu wants to merge 1 commit into
Conversation
…lling The event-controller migration converted the thumbtable's button-release-event signal to a GtkGestureMultiPress and inherited the cancel->release bridge: on every gesture cancel the bridge fakes a released(1,0,0), and the release handler interpreted that as a click. A cancel is not a click: GTK3 cancels gestures on grab-notify/controller resets, and a press whose release never arrived (e.g. the second press of a double-click that switched to darkroom on press) keeps a stale point in the gesture that a later hover crossing can cancel. Moving the mouse over the lighttable thumbtable then silently ran select_single() on the hovered image (issue darktable-org#21813). Restore the pre-gesture semantics: the release handler only acts on a real GDK button release -- exactly what the old button-release-event handler received -- while the cancel->release relay stays for the pressed-state cleanup the bauhaus handlers rely on.
TurboGit
reviewed
Aug 14, 2026
Member
|
@Arecsu : Given the amount of work you're doing I'll be happy to do the change I proposed above. Just let me know. |
Contributor
Author
Please feel always free to do it, in all seriousness, I'm trying my best keeping up with life, bugfixes and gtk4 improvements that I'm out of hands. So please, don't even ask for permission! |
Member
|
Manually merged with minor code simplification. |
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.
Fixes #21813 — hovering over the thumbtable after returning from the darkroom changed the selected image. Move the mouse over an unselected thumbnail and the selection jumped to it, even with "prioritize hovered image over the selected images" disabled.
This was a regression from the event-signal → event-controller conversion (#21659), which changed how a click is delivered to the lighttable and culling views:
The release handlers now require a real
GDK_BUTTON_RELEASE— the same guarantee the old signal-based handlers had — while the cancel→release relay stays for the pressed-state cleanup it was added for.No behavior changes for actual clicks: single-click selection, double-click into the darkroom, and zoomable dragging all work as before.
Related: #21813 #21659