[gtk+] switch: Fix int/double comparison
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] switch: Fix int/double comparison
- Date: Thu, 5 Oct 2017 08:18:32 +0000 (UTC)
commit 7770bdcb36e29455baa37ffcb9d94294b208ff54
Author: Timm Bäder <mail baedert org>
Date: Thu Oct 5 10:16:18 2017 +0200
switch: Fix int/double comparison
We get a double coordinate.
gtk/gtkswitch.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 91fc344..659e9ed 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -192,8 +192,8 @@ gtk_switch_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
/* If the press didn't happen in the draggable handle,
* cancel the pan gesture right away
*/
- if ((priv->is_active && x <= allocation.width / 2) ||
- (!priv->is_active && x > allocation.width / 2))
+ if ((priv->is_active && x <= allocation.width / 2.0) ||
+ (!priv->is_active && x > allocation.width / 2.0))
gtk_gesture_set_state (priv->pan_gesture, GTK_EVENT_SEQUENCE_DENIED);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]