From: Vadim Zeitlin Date: Sat, 11 Sep 2010 10:18:19 +0000 (+0000) Subject: Remember the last key event in wxGTK before passing it over to IM. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9cbe96d0932a00ed61bc3cbd8a67013e9c8576e1 Remember the last key event in wxGTK before passing it over to IM. Save the last key event before calling IM filter to be able to get the correct modifiers, timestamp, position &c to use for the CHAR event generated from IM commit callback. This restores the changes of r34504 which were reverted for unknown (or at least unmentioned) reason in r34521. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 30985280bd..d208b4eae4 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -881,8 +881,10 @@ gtk_window_key_press_callback( GtkWidget *WXUNUSED(widget), return_after_IM = true; } - if ((!ret) && (win->m_imData != NULL)) + if (!ret && win->m_imData) { + win->m_imData->lastKeyEvent = gdk_event; + // We should let GTK+ IM filter key event first. According to GTK+ 2.0 API // docs, if IM filter returns true, no further processing should be done. // we should send the key_down event anyway.