]> git.saurik.com Git - wxWidgets.git/commitdiff
Reverting patch 1325857
authorJulian Smart <julian@anthemion.co.uk>
Mon, 30 Jan 2006 20:04:58 +0000 (20:04 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 30 Jan 2006 20:04:58 +0000 (20:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/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)
     {
index eebfa24d1e8a38704929e8387bd2380436da6552..f7dd7acaebeb5e3cb94f377a3e045951c26de581 100644 (file)
@@ -1057,18 +1057,17 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
     bool return_after_IM = false;
 
     if( wxTranslateGTKKeyEventToWx(event, win, gdk_event) == false )
+    {
+        // Emit KEY_DOWN event
+        ret = win->GetEventHandler()->ProcessEvent( event );
+    }
+    else
     {
         // Return after IM processing as we cannot do
         // anything with it anyhow.
         return_after_IM = true;
     }
 
-    if (return_after_IM)
-        return false;
-
-    // Emit KEY_DOWN event
-    ret = win->GetEventHandler()->ProcessEvent( event );
-
     // This is for GTK+ 1.2 only. The char event generatation for GTK+ 2.0 is done
     // in the "commit" handler.
 
@@ -1127,6 +1126,9 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
         return true;
     }
 
+    if (return_after_IM)
+        return false;
+
 #if wxUSE_ACCEL
     if (!ret)
     {