]> git.saurik.com Git - wxWidgets.git/commitdiff
Remember the last key event in wxGTK before passing it over to IM.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Sep 2010 10:18:19 +0000 (10:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Sep 2010 10:18:19 +0000 (10:18 +0000)
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

src/gtk/window.cpp

index 30985280bdfbfc24d74643e7fb669ad6e621fa38..d208b4eae430ab771bcfe48b4e6e9fcb710bbb7b 100644 (file)
@@ -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.