]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/bmpbuttn.cpp
couple of minor bug fixes/enhancements (interface unchanged)
[wxWidgets.git] / src / gtk1 / bmpbuttn.cpp
index f1a0aa1a465684cff5b39f9da1bbd6769ee54cac..4e33f54278948aa48cf32bd1fa7e1626c439d163 100644 (file)
 
 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);