Commit 0c6251d0 authored by Thomas Wood's avatar Thomas Wood Committed by Matthias Clasen

switch: allow the user to toggle the switch by clicking on the handle

parent 49a6e0c2
......@@ -202,6 +202,15 @@ gtk_switch_button_release (GtkWidget *widget,
return TRUE;
/* toggle the switch if the handle was clicked but a drag had not been
* initiated */
if (!priv->is_dragging && !priv->in_press)
gtk_switch_set_active (GTK_SWITCH (widget), !priv->is_active);
return TRUE;
/* dragged toggle */
if (priv->is_dragging)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment