Catching dclick event from a spinbutton or spin control

crashes GTK 1.2 sooner or later. Just disable this
    event for now. Should also be in 2.4, actually.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-12-08 18:02:30 +00:00
parent cdbecb3946
commit df135f2b4d
2 changed files with 30 additions and 2 deletions

View File

@@ -1695,6 +1695,20 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
wxPrintf( wxT(".\n") );
*/
#ifndef __WXGTK20__
if (event_type == wxEVT_LEFT_DCLICK)
{
// GTK 1.2 crashes when intercepting double
// click events from both wxSpinButton and
// wxSpinCtrl
if (GTK_IS_SPIN_BUTTON(win->m_widget))
{
// Just disable this event for now.
return FALSE;
}
}
#endif
if (win->GetEventHandler()->ProcessEvent( event ))
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_press_event" );
@@ -1898,7 +1912,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget,
wxLogTrace(TRACE_FOCUS,
_T("%s: focus in"), win->GetName().c_str());
#ifdef HAVE_XIM
if (win->m_ic)
gdk_im_begin(win->m_ic, win->m_wxwindow->window);