EDIT: Turns out that an EventBox
was exactly what I needed. It dropped in and functioned exactly as expected!
I was working on an app whose single window is to blink under certain criteria until the user clicks on it. Once clicked, the window ceases blinking until the criteria is again met.
That all worked just lovely.
Now, the app has evolved to require what would've previously been several windows (several instances of the aforementioned single window) become Gtk.Box
es within a Gtk.Grid
.
The previous approach called this attachment:
self.connect("button-press-event", self.__window_clicked)
Once the individual Gtk.Window
s became Gtk.Box
es, however, this method stopped working. The callback is simply never fired.
According to this page, I'd expect that button-press-event
would be among the 69 signals inherited from Gtk.Widget
. Am I wrong about that? It seems I must be.
How should I be detecting a click received by a Gtk.Box
?