Some key press events are not consumed by the Textview since 3.24.2
Steps to reproduce
- Press the key
a
-> only the textview keypress event is triggered - Press the key
^
-> the event is propagated to the notebook
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class TextViewWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="TextView Example")
self.set_default_size(350, 350)
notebook = Gtk.Notebook()
textview = Gtk.TextView()
notebook.append_page(textview, Gtk.Label(label='test'))
notebook.connect('key-press-event', self._notebook_key_press)
textview.connect('key-press-event', self._textview_key_press)
self.add(notebook)
self.show_all()
def _notebook_key_press(self, *args):
print('Notebook event triggered')
def _textview_key_press(self, *args):
print('Textview event triggered')
win = TextViewWindow()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
Current behavior
Event is propagated although it should be consumed by the textview
Expected outcome
Event is not propagated
Version information
- 3.24.2
- Windows 7 / MSYS2
Additional information
- This does not happen on 3.24.1, there on pressing
^
only the textview keypress event is triggered