Skip to content

switch: Fix toggling switch on touch devices

priv->is_switch is used to get hint if the gesture happened on the switch. On touch devices, ::enter-notify-event may not be emitted, and so priv->is_switch may not be set.

Let it be set when ::pressed gesture is emitted so that the switch is toggled when the gesture occurs regardless of whether a pointing device is present or not.

Please note that this patch fixes only click/tap on switches, not slide.

Merge request reports