]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
clang fix, fixes #12332
[wxWidgets.git] / src / gtk / window.cpp
index 86eb2c026dad29e5a9ef377cc32306626f13787b..85c1dfc1d147c33d4275dce3e2b8b8f014b7592f 100644 (file)
@@ -729,7 +729,7 @@ static void wxFillOtherKeyEventFields(wxKeyEvent& event,
     }
 
     event.m_rawCode = (wxUint32) gdk_event->keyval;
-    event.m_rawFlags = 0;
+    event.m_rawFlags = gdk_event->hardware_keycode;
 
     wxGetMousePosition( &x, &y );
     win->ScreenToClient( &x, &y );
@@ -2048,9 +2048,7 @@ wxMouseState wxGetMouseState()
 // method
 #ifdef __WXUNIVERSAL__
     IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase)
-#else // __WXGTK__
-    IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
-#endif // __WXUNIVERSAL__/__WXGTK__
+#endif // __WXUNIVERSAL__
 
 void wxWindowGTK::Init()
 {
@@ -2617,8 +2615,7 @@ void wxWindowGTK::OnInternalIdle()
         m_needsStyleChange = false;
     }
 
-    if (wxUpdateUIEvent::CanUpdate(this) && IsShownOnScreen())
-        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
+    wxWindowBase::OnInternalIdle();
 }
 
 void wxWindowGTK::DoGetSize( int *width, int *height ) const
@@ -3782,19 +3779,23 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip )
     {
         GtkWidget *w = GetConnectWidget();
         wxToolTip::GTKApply(w, NULL);
-#if GTK_CHECK_VERSION(2, 12, 0)
-        // Just applying NULL doesn't work on 2.12.0, so also use
-        // gtk_widget_set_has_tooltip. It is part of the new GtkTooltip API
-        // but seems also to work with the old GtkTooltips.
-        if (gtk_check_version(2, 12, 0) == NULL)
-            gtk_widget_set_has_tooltip(w, FALSE);
-#endif
     }
 }
 
 void wxWindowGTK::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip )
 {
-    gtk_tooltips_set_tip(tips, GetConnectWidget(), tip, NULL);
+    GtkWidget *w = GetConnectWidget();
+
+#if GTK_CHECK_VERSION(2, 12, 0)
+    if (!gtk_check_version(2, 12, 0))
+    {
+        gtk_widget_set_tooltip_text (w, tip);
+    }
+    else
+#endif
+    {
+        gtk_tooltips_set_tip(tips, w, tip, NULL);
+    }
 }
 #endif // wxUSE_TOOLTIPS