The function gtk_list_item_widget_hover_cb
should not be controlled by the single_click_activate
state variable.
Obviously, click and hover are different states.
According to the source code, click and hover activation actions are different: “list.select-item”, “list.activate-item”
But GtkListView does not provide parameters to distinguish different activation methods.
My function is very simple, click once to activate the item, do an action, set the background color according to :selected
,
But when using single_click_activate, hover changes the state of :selected
, but does not activate the item, causing confusion