X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4db172a3b318df9aff178eb6c5da149d56e0859..ce7208d49d5ce2ca1dc0b3b83f14f1d04f29c4bf:/src/gtk1/window.cpp?ds=sidebyside diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index d5a37d77f8..cbb766c42b 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -19,18 +19,22 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/frame.h" + #include "wx/dcclient.h" + #include "wx/menu.h" + #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/dcclient.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/layout.h" -#include "wx/utils.h" -#include "wx/dialog.h" -#include "wx/msgdlg.h" -#include "wx/module.h" -#include "wx/combobox.h" - #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" #endif @@ -43,20 +47,12 @@ #include "wx/caret.h" #endif // wxUSE_CARET -#if wxUSE_TEXTCTRL - #include "wx/textctrl.h" -#endif - -#include "wx/menu.h" -#include "wx/statusbr.h" -#include "wx/settings.h" #include "wx/fontutil.h" #ifdef __WXDEBUG__ #include "wx/thread.h" #endif -#include "wx/math.h" #include #include "wx/gtk1/private.h" @@ -203,7 +199,6 @@ // data //----------------------------------------------------------------------------- -extern wxList wxPendingDelete; extern bool g_blockEventsOnDrag; extern bool g_blockEventsOnScroll; extern wxCursor g_globalCursor; @@ -830,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: @@ -1352,7 +1347,7 @@ template void InitMouseEvent(wxWindowGTK *win, static void AdjustEventButtonState(wxMouseEvent& event) { // GDK reports the old state of the button for a button press event, but - // for compatibility with MSW and common sense we want m_leftDown be TRUE + // for compatibility with MSW and common sense we want m_leftDown be true // for a LEFT_DOWN event, not FALSE, so we will invert // left/right/middleDown for the corresponding click events @@ -2936,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() ); - } }