mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 22:10:08 +00:00
a11y: Transform GetCharacterExtents coords to native surface ones
These coordinates are "window"-relative, so transform textview coordinates to the coordinate system of the GtkNative containing it.
This commit is contained in:
parent
7750a2c423
commit
e895f7dd70
@ -1126,6 +1126,13 @@ text_view_handle_method (GDBusConnection *connection,
|
||||
rect.x, rect.y,
|
||||
&x, &y);
|
||||
|
||||
double dx, dy;
|
||||
gtk_widget_translate_coordinates (widget,
|
||||
GTK_WIDGET (gtk_widget_get_native (widget)),
|
||||
(double) x, (double) y, &dx, &dy);
|
||||
x = floor (dx);
|
||||
y = floor (dy);
|
||||
|
||||
g_dbus_method_invocation_return_value (invocation,
|
||||
g_variant_new ("(iiii)",
|
||||
x,
|
||||
|
Loading…
Reference in New Issue
Block a user