Fix infinite WebView key event chain when it doesn't handle a key press.
* src/client/components/main-window.vala (MainWindow): Convert on_key_press_event handler to override Gtk.Window's key_press_event virtual method. Reimplement that so that single keystroke shortcuts work, but also so GtkWindow.propagate_key_event only gets called once, and the WebKit event loop is avoided. See source comments for details. Also clean up shift up/down handling to not update when any GtkEntry or ComposerWebView is focused.
This commit is contained in:
parent
a498719723
commit
a8d1da7ee7
2 changed files with 61 additions and 19 deletions
|
|
@ -6,7 +6,6 @@
|
|||
<property name="show_menubar">False</property>
|
||||
<property name="events">GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
|
||||
<signal name="delete_event" handler="on_delete_event"/>
|
||||
<signal name="key_press_event" handler="on_key_press_event"/>
|
||||
<signal name="key_release_event" handler="on_key_release_event"/>
|
||||
<signal name="focus_in_event" handler="on_focus_event"/>
|
||||
<child>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue