-gtk_combo_select_child_callback( GtkList *WXUNUSED(list), GtkWidget *WXUNUSED(widget), wxComboBox *combo )
-{
- if (g_isIdle) wxapp_install_idle_handler();
-
- if (!combo->m_hasVMT) return;
-
- if (g_blockEventsOnDrag) return;
-
- int curSelection = combo->GetSelection();
-
- if (combo->m_prevSelection == curSelection) return;
-
- GtkWidget *list = GTK_COMBO(combo->m_widget)->list;
- gtk_list_unselect_item( GTK_LIST(list), combo->m_prevSelection );
-
- combo->m_prevSelection = curSelection;
-
- // Quickly set the value of the combo box
- // as GTK+ does that only AFTER the event
- // is sent.
- gtk_signal_disconnect_by_func( GTK_OBJECT(GTK_COMBO(combo->GetHandle())->entry),
- GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)combo );
- combo->SetValue( combo->GetStringSelection() );
- gtk_signal_connect( GTK_OBJECT(GTK_COMBO(combo->GetHandle())->entry), "changed",
- GTK_SIGNAL_FUNC(gtk_text_changed_callback), (gpointer)combo );
-
- wxCommandEvent event( wxEVT_COMMAND_COMBOBOX_SELECTED, combo->GetId() );
- event.SetInt( curSelection );
- event.SetString( combo->GetStringSelection() );
+gtkcombobox_popupshown_callback(GObject *WXUNUSED(gobject),
+ GParamSpec *WXUNUSED(param_spec),
+ wxComboBox *combo)
+{
+ gboolean isShown;
+ g_object_get( combo->m_widget, "popup-shown", &isShown, NULL );
+ wxCommandEvent event( isShown ? wxEVT_COMBOBOX_DROPDOWN
+ : wxEVT_COMBOBOX_CLOSEUP,
+ combo->GetId() );