X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0fb62a656c9e47dc4887c5143e692616c36aa37..65776a1582e9ae237fc4b5587fb72582d25c06ac:/src/gtk/window.cpp diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 86eb2c026d..1e4523f340 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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 ); @@ -3794,7 +3794,18 @@ void wxWindowGTK::DoSetToolTip( wxToolTip *tip ) void wxWindowGTK::GTKApplyToolTip( GtkTooltips *tips, const gchar *tip ) { - gtk_tooltips_set_tip(tips, GetConnectWidget(), tip, NULL); + GtkWidget *w = GetConnectWidget(); + gtk_tooltips_set_tip(tips, w, tip, NULL); + +#if GTK_CHECK_VERSION(2, 12, 0) + if ( !tip || tip[0] == '\0' ) + { + // Just applying empty tool tip doesn't work on 2.12.0, so also use + // gtk_widget_set_has_tooltip. + if (gtk_check_version(2, 12, 0) == NULL) + gtk_widget_set_has_tooltip(w, FALSE); + } +#endif } #endif // wxUSE_TOOLTIPS