]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
Added missing include
[wxWidgets.git] / src / gtk / window.cpp
index 60eb991902e3adbdbd0e5962a15882b240b91ad9..681e5e82a35469a2899b6e2c1368d44de32570ef 100644 (file)
@@ -976,7 +976,12 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
     bool ret = false;
     bool return_after_IM = false;
 
-    if( wxTranslateGTKKeyEventToWx(event, win, gdk_event) == false )
+    if( wxTranslateGTKKeyEventToWx(event, win, gdk_event) )
+    {
+        // Emit KEY_DOWN event
+        ret = win->GetEventHandler()->ProcessEvent( event );
+    }
+    else
     {
         // Return after IM processing as we cannot do
         // anything with it anyhow.
@@ -1011,9 +1016,6 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
     if (return_after_IM)
         return false;
 
-    // Emit KEY_DOWN event
-    ret = win->GetEventHandler()->ProcessEvent( event );
-
 #if wxUSE_ACCEL
     if (!ret)
     {