forked from osmocom/wireshark
74b20dca8c
The Broadway GDK backend does never sets event->string. This results in a crash when filter_string_te_key_pressed_cb tries to read its contents. Since the documentation marks reading the string as deprecated, try to handle the character conversion here. It is based on _gdk_x11_event_translate_keyboard_string (from gtk+), but without trying to interpret Escape as '\033', and without trying to convert control characters (example: Ctrl + 1). A buffer of 6 bytes is used to hold a UTF-8 code point (there is no zero terminator, so 7 bytes as found in the original implementation is unnecessary). As g_locale_from_utf8 returns dynamically allocated memory, change the control flow to have a single exit point where pointers are freed as needed. Reproduce with gtk3: $ broadwayd :5 $ GDK_BACKEND=broadway BROADWAY_DISPLAY=:5 wireshark-gtk (now open http://localhost:8085/ and start typing in the display filter) Keys tested: e € (AltGr + 5) ü (AltGr + ", u) In the X11 backend, these still get displayed correctly. In the broadway backend however, the accents are missing due to a bug in the broadway implementation. Change-Id: Ic1f0ee2b87cd573023ee8e966f06489b3b744dcf Reviewed-on: https://code.wireshark.org/review/5832 Reviewed-by: Balint Reczey <balint@balintreczey.hu> |
||
---|---|---|
.. | ||
cli | ||
gtk | ||
qt | ||
win32 | ||
CMakeLists.txt | ||
Makefile.am | ||
Makefile.common | ||
Makefile.nmake | ||
alert_box.c | ||
alert_box.h | ||
capture.c | ||
capture.h | ||
capture_globals.h | ||
capture_ui_utils.c | ||
capture_ui_utils.h | ||
console.c | ||
console.h | ||
decode_as_utils.c | ||
decode_as_utils.h | ||
doxygen.cfg.in | ||
export_object.c | ||
export_object.h | ||
export_object_dicom.c | ||
export_object_http.c | ||
export_object_smb.c | ||
export_object_tftp.c | ||
file_dialog.h | ||
filters.c | ||
filters.h | ||
follow.c | ||
follow.h | ||
help_url.c | ||
help_url.h | ||
iface_lists.c | ||
iface_lists.h | ||
io_graph_item.c | ||
io_graph_item.h | ||
language.c | ||
language.h | ||
last_open_dir.h | ||
main_statusbar.h | ||
packet_list_utils.c | ||
packet_list_utils.h | ||
persfilepath_opt.c | ||
persfilepath_opt.h | ||
preference_utils.c | ||
preference_utils.h | ||
profile.c | ||
profile.h | ||
progress_dlg.h | ||
proto_hier_stats.c | ||
proto_hier_stats.h | ||
recent.c | ||
recent.h | ||
recent_utils.h | ||
rtp_analysis.h | ||
rtp_stream.h | ||
simple_dialog.h | ||
software_update.c | ||
software_update.h | ||
ssl_key_export.c | ||
ssl_key_export.h | ||
tap-megaco-common.c | ||
tap-megaco-common.h | ||
tap-rtp-common.c | ||
tap-rtp-common.h | ||
tap-sctp-analysis.c | ||
tap-sctp-analysis.h | ||
tap-sequence-analysis.c | ||
tap-sequence-analysis.h | ||
tap-tcp-stream.c | ||
tap-tcp-stream.h | ||
tap_export_pdu.c | ||
tap_export_pdu.h | ||
text_import.c | ||
text_import.h | ||
text_import_scanner.h | ||
text_import_scanner.l | ||
time_shift.c | ||
time_shift.h | ||
traffic_table_ui.c | ||
traffic_table_ui.h | ||
ui_util.h | ||
utf8_entities.h | ||
util.c | ||
util.h | ||
voip_calls.c | ||
voip_calls.h |