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:
@@ -1695,6 +1695,20 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
|||||||
wxPrintf( wxT(".\n") );
|
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 ))
|
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||||
{
|
{
|
||||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_press_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,
|
wxLogTrace(TRACE_FOCUS,
|
||||||
_T("%s: focus in"), win->GetName().c_str());
|
_T("%s: focus in"), win->GetName().c_str());
|
||||||
|
|
||||||
#ifdef HAVE_XIM
|
#ifdef HAVE_XIM
|
||||||
if (win->m_ic)
|
if (win->m_ic)
|
||||||
gdk_im_begin(win->m_ic, win->m_wxwindow->window);
|
gdk_im_begin(win->m_ic, win->m_wxwindow->window);
|
||||||
|
@@ -1695,6 +1695,20 @@ static gint gtk_window_button_press_callback( GtkWidget *widget,
|
|||||||
wxPrintf( wxT(".\n") );
|
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 ))
|
if (win->GetEventHandler()->ProcessEvent( event ))
|
||||||
{
|
{
|
||||||
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "button_press_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,
|
wxLogTrace(TRACE_FOCUS,
|
||||||
_T("%s: focus in"), win->GetName().c_str());
|
_T("%s: focus in"), win->GetName().c_str());
|
||||||
|
|
||||||
#ifdef HAVE_XIM
|
#ifdef HAVE_XIM
|
||||||
if (win->m_ic)
|
if (win->m_ic)
|
||||||
gdk_im_begin(win->m_ic, win->m_wxwindow->window);
|
gdk_im_begin(win->m_ic, win->m_wxwindow->window);
|
||||||
|
Reference in New Issue
Block a user