diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c index 4b5e270aa0..15f11a4649 100644 --- a/gtk/gtkswitch.c +++ b/gtk/gtkswitch.c @@ -211,8 +211,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); }