milis/talimatname/genel/w/wxgtk/wxgtk-webkit-infinite-loop....

37 lines
1.2 KiB
Diff
Raw Normal View History

2018-06-09 00:06:58 +02:00
From 572fe37898f8d4f8664849ec76483dd63ea13a13 Mon Sep 17 00:00:00 2001
From: Paul Cornett <paulcor@users.noreply.github.com>
Date: Sat, 6 Jan 2018 11:07:11 -0800
Subject: [PATCH] Avoid calling default "key-press-event" handler
We have already done everything it does, and doing it again seems to
cause an infinite loop with WebKitGTK. See #17932
---
src/gtk/toplevel.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp
index f63fdd3e463..ae825d40396 100644
--- a/src/gtk/toplevel.cpp
+++ b/src/gtk/toplevel.cpp
@@ -227,15 +227,15 @@ wxgtk_tlw_key_press_event(GtkWidget *widget, GdkEventKey *event)
// GTK+ gtk_window_key_press_event() handler.
if ( gtk_window_propagate_key_event(window, event) )
- return TRUE;
+ return true;
if ( gtk_window_activate_key(window, event) )
- return TRUE;
+ return true;
- if (GTK_WIDGET_GET_CLASS(widget)->key_press_event(widget, event))
- return TRUE;
+ GTK_WIDGET_GET_CLASS(widget)->key_press_event(widget, event);
- return FALSE;
+ // Avoid calling the default handler, we have already done everything it does
+ return true;
}
}