aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-02-20 16:09:06 +0100
committerBalint Reczey <balint@balintreczey.hu>2015-02-20 17:04:41 +0000
commit1a10f5f2b470dede438ac33c25e0cb86c8e12e17 (patch)
treef536a20864ead290ae09dc09c4a775c57791737c
parentbccb7f73c7ff99405c83dd48a0997787f18f2d71 (diff)
ui/gtk: fix control combos such as ctrl-a, ctrl-c
Ignore any Ctrl combinations to allow pasting to work. Regression introduced in "gtk: fix crash on Broadway GDK backend". Change-Id: I3d53db2d224cb604b52081002ff923c8684a8d0a Reviewed-on: https://code.wireshark.org/review/7276 Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Balint Reczey <balint@balintreczey.hu>
-rw-r--r--ui/gtk/filter_autocomplete.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/gtk/filter_autocomplete.c b/ui/gtk/filter_autocomplete.c
index b7ecf36b91..1c3ea18683 100644
--- a/ui/gtk/filter_autocomplete.c
+++ b/ui/gtk/filter_autocomplete.c
@@ -368,9 +368,17 @@ filter_string_te_key_pressed_cb(GtkWidget *filter_te, GdkEventKey *event, gpoint
if (!key_string)
key_string = g_strdup("");
- /* If the pressed key is SHIFT then we have nothing to do with the pressed key. */
- if( k == GDK_Shift_L || k == GDK_Shift_R)
+ /* Ignore Ctrl combinations (Ctrl-C, Ctrl-V, Ctrl-Right, ...). */
+ if (event->state & GDK_CONTROL_MASK)
goto exit;
+ /* Pressing modifiers such as Shift or Ctrl should not hide the list. */
+ switch (k) {
+ case GDK_Shift_L:
+ case GDK_Shift_R:
+ case GDK_KEY_Control_L:
+ case GDK_KEY_Control_R:
+ goto exit;
+ }
if (popup_win)
gtk_widget_show(popup_win);