mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
GtkSwitch: Return FALSE from the button press handler
This makes the behavior identical to other widgets which handle button presses, and it avoids problems when placing switches into a windows main toolbar. https://bugzilla.gnome.org/show_bug.cgi?id=656986
This commit is contained in:
parent
c9023cadbf
commit
c83db6cdf0
@ -112,7 +112,7 @@ gtk_switch_button_press (GtkWidget *widget,
|
||||
if (event->x <= allocation.width / 2)
|
||||
{
|
||||
priv->in_press = TRUE;
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
priv->offset = event->x - allocation.width / 2;
|
||||
@ -125,7 +125,7 @@ gtk_switch_button_press (GtkWidget *widget,
|
||||
if (event->x >= allocation.width / 2)
|
||||
{
|
||||
priv->in_press = TRUE;
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
priv->offset = event->x;
|
||||
@ -137,7 +137,7 @@ gtk_switch_button_press (GtkWidget *widget,
|
||||
"gtk-dnd-drag-threshold", &priv->drag_threshold,
|
||||
NULL);
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user