X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47908e25f992135fbc8c9573870784c62654e9e9..d93f63db9d836a7d303343e60fb034dc9a1360d0:/src/gtk1/bmpbuttn.cpp diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index f1a0aa1a46..4e33f54278 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -20,14 +20,23 @@ class wxBitmapButton; +//----------------------------------------------------------------------------- +// data +//----------------------------------------------------------------------------- + +extern bool g_blockEventsOnDrag; + //----------------------------------------------------------------------------- // wxBitmapButton //----------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxControl) -void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitmapButton *button ) +static void gtk_bmpbutton_clicked_callback( GtkWidget *WXUNUSED(widget), wxBitmapButton *button ) { + if (!button->HasVMT()) return; + if (g_blockEventsOnDrag) return; + wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId()); event.SetEventObject(button); button->GetEventHandler()->ProcessEvent(event);