Skip to content

text: Use the widget y coordinate for gestures

Alice Mikhaylenko requested to merge wip/exalm/gtktext-selection-fix into master

Currently we use layout coordinates and widget height when determining where a click or drag has happened. If the widget has top padding (which it does inside a GtkEntry, for example), we get negative Y coordinate inside that padding, and also count an equal area below the GtkText as being inside it.

Since GtkText is always single-line, there's no need to do any of that and we can use widget coordinates. Then using widget height to determine the lower bound makes sense and both problems go away.

Merge request reports