Fixes #21084 by reverting to gtk_widget_event.#21085
Merged
Merged
Conversation
Collaborator
Author
TurboGit
approved these changes
May 21, 2026
Member
TurboGit
left a comment
There was a problem hiding this comment.
I cannot reproduce myself, but I trust you. Thanks for this critical fix for the release. We still have some time to get field testing.
Member
|
@dtorop : As this was your work, please double check that all is also working fine on your side. TIA. |
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 scrolling regression introduced by #21084.
Co-authored with Gemini.
Root cause
The commit replaced the native GTK3 scroll event propagation method (
gtk_widget_event) with a custom function (_panel_scrolled) for scrolling the side panels via borders or modifier keys.Instead of letting GTK's
GtkScrolledWindownatively handle the scroll events and smoothly animate the view,_panel_scrolledexplicitly manipulated theGtkAdjustmentvalue.This bypasses the built-in GTK kinetic scrolling engine, and caused every scroll event to instantly "snap" the panel to a new offset, leading to the jerky scrolling behavior.
Fix Details
_panel_scrolledback to_borders_scrolledso that it usesgtk_widget_event()to forwardGdkEventScrollsproperly from the borders directly to the scrolled window._scroll_sidebarproxy handler (which intercepts side panel scrolls when modifier keys are pressed) to again usegtk_widget_eventinstead of manually jumping the adjustment by calculating steps.This ensures that the panels delegate the scroll events correctly, allowing GTK's smooth interpolation and native kinetic scrolling behaviors to work again.
This is a stopgap to address the regression, the fix is not GTK4 friendly.
Eventually, this will need to be rewritten, likely by restructuring the widget layout so that scroll events bubble up naturally to the
GtkScrolledWindow, or by implementing a smooth interpolation mechanism for the scroll adjustments.Also, note that the change that caused the regression has a much broader scope. This PR only undoes as little as possible to restore the correct scrolling behavior.