[gtk/wip/carlosg/texthandles-position] gtkentry: Fix text handle coordinates calculation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/texthandles-position] gtkentry: Fix text handle coordinates calculation
- Date: Tue, 29 Jan 2019 11:18:04 +0000 (UTC)
commit a15325ef44d8f473942bba06e076345792246732
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 29 12:00:07 2019 +0100
gtkentry: Fix text handle coordinates calculation
The text allocation is already in widget-local coordinates, involving the
GtkAllocation here is not right.
gtk/gtkentry.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 26fe36b100..f5231424e4 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3536,12 +3536,10 @@ gtk_entry_move_handle (GtkEntry *entry,
}
else
{
- GtkAllocation allocation;
GdkRectangle rect;
- gtk_widget_get_allocation (GTK_WIDGET (entry), &allocation);
- rect.x = x + text_allocation.x - allocation.x;
- rect.y = y + text_allocation.y - allocation.y;
+ rect.x = x + text_allocation.x;
+ rect.y = y + text_allocation.y;
rect.width = 1;
rect.height = height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]