mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
togglebutton: Remove gtk-touchcreen-mode usage
Emulated crossing events with mode GDK_CROSSING_TOUCH_PRESS/RELEASE already cater dynamically for the "don't prelight on touch devices" usecase.
This commit is contained in:
parent
24e9a19abe
commit
87f6bb32ed
@ -656,13 +656,9 @@ gtk_toggle_button_update_state (GtkButton *button)
|
||||
{
|
||||
GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button);
|
||||
GtkToggleButtonPrivate *priv = toggle_button->priv;
|
||||
gboolean depressed, touchscreen;
|
||||
gboolean depressed;
|
||||
GtkStateFlags new_state = 0;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
|
||||
"gtk-touchscreen-mode", &touchscreen,
|
||||
NULL);
|
||||
|
||||
new_state = gtk_widget_get_state_flags (GTK_WIDGET (button)) &
|
||||
~(GTK_STATE_FLAG_INCONSISTENT |
|
||||
GTK_STATE_FLAG_PRELIGHT |
|
||||
@ -678,7 +674,7 @@ gtk_toggle_button_update_state (GtkButton *button)
|
||||
else
|
||||
depressed = priv->active;
|
||||
|
||||
if (!touchscreen && button->priv->in_button && (!button->priv->button_down || priv->draw_indicator))
|
||||
if (button->priv->in_button && (!button->priv->button_down || priv->draw_indicator))
|
||||
new_state |= GTK_STATE_FLAG_PRELIGHT;
|
||||
|
||||
if (depressed)
|
||||
|
Loading…
Reference in New Issue
Block a user