Well, having examined a couple of days, I asked a question here and found the answer after 5 minutes.
To register a mouse click, instead of the “activate” signal, it is necessary to use the “button-press-event” signal.
May help someone with a similar problem.
GTK needs better documentation.
user250145
source share