[gnome-todo] task-row: Use double for coordinates
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-row: Use double for coordinates
- Date: Fri, 19 Jun 2020 21:05:24 +0000 (UTC)
commit 2d7c913e6317f0e3bb6d97bb6eecfed39aa0f64f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Jun 19 18:04:31 2020 -0300
task-row: Use double for coordinates
And make the trace message print long floats (i.e. doubles)
otherwise it's BANG! invalid read and crash
src/gui/gtd-task-row.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/gtd-task-row.c b/src/gui/gtd-task-row.c
index 45bb6bd..e06a0be 100644
--- a/src/gui/gtd-task-row.c
+++ b/src/gui/gtd-task-row.c
@@ -218,8 +218,8 @@ on_button_press_event_cb (GtkGestureClick *gesture,
GtdTaskRow *self)
{
GtkWidget *widget;
- gint real_x;
- gint real_y;
+ gdouble real_x;
+ gdouble real_y;
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
@@ -233,7 +233,7 @@ on_button_press_event_cb (GtkGestureClick *gesture,
self->clicked_x = real_x;
self->clicked_y = real_y;
- GTD_TRACE_MSG ("GtkGestureClick:pressed received from a %s at %.1f,%.1f (%d,%d)",
+ GTD_TRACE_MSG ("GtkGestureClick:pressed received from a %s at %.1lf,%.1lf (%.1lf,%.1lf)",
G_OBJECT_TYPE_NAME (widget),
x,
y,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]