]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
correct compilation after last change (added ifdef in the wrong function...)
[wxWidgets.git] / src / gtk1 / window.cpp
index fdc9421a8dd6da939b621ff6bf93e30faedc11a9..08942c4548d84c739c872f167501c12f9b9c6b3d 100644 (file)
     #include "wx/dialog.h"
     #include "wx/settings.h"
     #include "wx/msgdlg.h"
+    #include "wx/textctrl.h"
+    #include "wx/combobox.h"
+    #include "wx/layout.h"
+    #include "wx/statusbr.h"
+    #include "wx/math.h"
+    #include "wx/module.h"
 #endif
 
-#include "wx/layout.h"
-#include "wx/module.h"
-#include "wx/combobox.h"
-
 #if wxUSE_DRAG_AND_DROP
     #include "wx/dnd.h"
 #endif
     #include "wx/caret.h"
 #endif // wxUSE_CARET
 
-#if wxUSE_TEXTCTRL
-    #include "wx/textctrl.h"
-#endif
-
-#include "wx/statusbr.h"
 #include "wx/fontutil.h"
 
 #ifdef __WXDEBUG__
     #include "wx/thread.h"
 #endif
 
-#include "wx/math.h"
 #include <ctype.h>
 
 #include "wx/gtk1/private.h"
@@ -829,7 +825,7 @@ static long wxTranslateKeySymToWXKey(KeySym keysym, bool isChar)
             break;
 
         case GDK_KP_Next: // == GDK_KP_Page_Down
-            key_code = isChar ? WXK_NEXT : WXK_NUMPAD_PAGEDOWN;
+            key_code = isChar ? WXK_PAGEDOWN : WXK_NUMPAD_PAGEDOWN;
             break;
 
         case GDK_KP_End:
@@ -2935,13 +2931,11 @@ void wxWindowGTK::OnInternalIdle()
                 gdk_window_set_cursor( window, cursor.GetCursor() );
 
         }
-        else
+        else if ( m_widget )
         {
-
             GdkWindow *window = m_widget->window;
-            if ((window) && !(GTK_WIDGET_NO_WINDOW(m_widget)))
+            if ( window && !GTK_WIDGET_NO_WINDOW(m_widget) )
                gdk_window_set_cursor( window, cursor.GetCursor() );
-
         }
     }
 
@@ -3418,16 +3412,14 @@ bool wxWindowGTK::SetCursor( const wxCursor &cursor )
 {
     wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") );
 
-    if (cursor == m_cursor)
+    if ( cursor.IsSameAs(m_cursor) )
        return false;
 
     if (g_isIdle)
         wxapp_install_idle_handler();
 
-    if (cursor == wxNullCursor)
-       return wxWindowBase::SetCursor( *wxSTANDARD_CURSOR );
-    else
-       return wxWindowBase::SetCursor( cursor );
+    return wxWindowBase::SetCursor( cursor.IsOk() ? cursor
+                                                  : *wxSTANDARD_CURSOR );
 }
 
 void wxWindowGTK::WarpPointer( int x, int y )