]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
gdk_draw_pixmap -> gdk_draw_drawable
[wxWidgets.git] / src / gtk1 / window.cpp
index eebfa24d1e8a38704929e8387bd2380436da6552..f2b3a7a69a79252c8df88403ad64130fac57c85e 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        gtk/window.cpp
+// Name:        src/gtk1/window.cpp
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -739,11 +739,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
             break;
 
         case GDK_Prior:     // == GDK_Page_Up
-            key_code = WXK_PRIOR;
+            key_code = WXK_PAGEUP;
             break;
 
         case GDK_Next:      // == GDK_Page_Down
-            key_code = WXK_NEXT;
+            key_code = WXK_PAGEDOWN;
             break;
 
         case GDK_End:
@@ -822,11 +822,11 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
             break;
 
         case GDK_KP_Prior: // == GDK_KP_Page_Up
-            key_code = isChar ? WXK_PRIOR : WXK_NUMPAD_PRIOR;
+            key_code = isChar ? WXK_PAGEUP : WXK_NUMPAD_PAGEUP;
             break;
 
         case GDK_KP_Next: // == GDK_KP_Page_Down
-            key_code = isChar ? WXK_NEXT : WXK_NUMPAD_NEXT;
+            key_code = isChar ? WXK_NEXT : WXK_NUMPAD_PAGEDOWN;
             break;
 
         case GDK_KP_End:
@@ -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)
     {
@@ -4230,4 +4232,3 @@ void wxWinModule::OnExit()
     if (g_eraseGC)
         gdk_gc_unref( g_eraseGC );
 }
-