event_monitor: Fix jumping to object on click
The source of an event in the event monitor log is shown as a hyperlink.
Pressing Enter when the text cursor is on the object would select the object in the tree view, but doing the same on a left mouse click on the hyperlink didn't work.
The button
member of the GdkEvent
is a
GdkEventButton
[1], while the comparison
was using it as if it were an integer.
Use the button's own button
property instead,
which is the uint
that needs to be checked here [2]:
button
The button which was pressed or released, numbered from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button can often be simulated by pressing both mouse buttons together.
[1] https://docs.gtk.org/gdk3/union.Event.html [2] https://docs.gtk.org/gdk3/struct.EventButton.html