a11y: Update the "pressed" state on toggle buttons

This commit is contained in:
Emmanuele Bassi 2020-07-13 16:10:36 +01:00
parent 58628f9a9e
commit 2c75ba5509

View File

@ -26,7 +26,9 @@
#include "gtktogglebutton.h"
#include "gtkaccessible.h"
#include "gtkbuttonprivate.h"
#include "gtkenums.h"
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkmain.h"
@ -311,6 +313,10 @@ gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
else
gtk_widget_unset_state_flags (GTK_WIDGET (toggle_button), GTK_STATE_FLAG_CHECKED);
gtk_accessible_update_state (GTK_ACCESSIBLE (toggle_button),
GTK_ACCESSIBLE_STATE_PRESSED, is_active,
-1);
gtk_toggle_button_toggled (toggle_button);
g_object_notify_by_pspec (G_OBJECT (toggle_button), toggle_button_props[PROP_ACTIVE]);