From 7542632302b0723c3ed7018dc843764ea62582b4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 26 Apr 2017 22:30:36 +0200 Subject: [PATCH] Fix keyboard event key codes when using Wayland Correct the confusion between compile- and run-time checks for X11. Closes #17848. --- src/gtk/window.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a7b1609072..b929ca6247 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -932,9 +932,11 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event, // got one key_code = keysymNormalized ? keysymNormalized : keysym; } -#else - key_code = keysym; -#endif + else +#endif // GDK_WINDOWING_X11 + { + key_code = keysym; + } // as explained above, we want to have lower register key codes // normally but for the letter keys we want to have the upper ones