X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4d25c01ae813d8fe13d7b2a267864ccaee1840d..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/gtk1/window.cpp diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 8878e9dbba..11167b3844 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1203,15 +1203,16 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, key_code = wxTranslateKeySymToWXKey(keysym, TRUE /* isChar */); if ( !key_code ) { - if ( gdk_event->length == 1 ) - { - key_code = (unsigned char)gdk_event->string[0]; - } - else if ( wxIsAsciiKeysym(keysym) ) + if ( wxIsAsciiKeysym(keysym) ) { // ASCII key key_code = (unsigned char)keysym; } + // gdk_event->string is actually deprecated + else if ( gdk_event->length == 1 ) + { + key_code = (unsigned char)gdk_event->string[0]; + } } if ( key_code )