From fbf49ef2b12b42dc3701f285365f90a1e7178d91 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 24 Mar 2011 16:52:55 +0000 Subject: [PATCH] fix tool item enter/leave notify, fixes #13083 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toolbar.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gtk/toolbar.cpp b/src/gtk/toolbar.cpp index 969c7f9f36..f883bc0801 100644 --- a/src/gtk/toolbar.cpp +++ b/src/gtk/toolbar.cpp @@ -479,6 +479,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) wxToolBarTool* tool = static_cast(toolBase); GSList* radioGroup; + GtkWidget* bin_child; switch ( tool->GetStyle() ) { case wxTOOL_STYLE_BUTTON: @@ -544,11 +545,12 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) m_tooltips, wxGTK_CONV(tool->GetShortHelp()), ""); } } - g_signal_connect(GTK_BIN(tool->m_item)->child, "button_press_event", + bin_child = gtk_bin_get_child(GTK_BIN(tool->m_item)); + g_signal_connect(bin_child, "button_press_event", G_CALLBACK(button_press_event), tool); - g_signal_connect(tool->m_item, "enter_notify_event", + g_signal_connect(bin_child, "enter_notify_event", G_CALLBACK(enter_notify_event), tool); - g_signal_connect(tool->m_item, "leave_notify_event", + g_signal_connect(bin_child, "leave_notify_event", G_CALLBACK(enter_notify_event), tool); if (tool->GetKind() == wxITEM_DROPDOWN)