aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-03-10 23:30:45 -0600
committerCody Russell <crussell@canonical.com>2010-03-10 23:30:45 -0600
commit0dfd8e6fea5b4c2bf6030ddc535ee06d8f2da744 (patch)
tree6a3b9a3c36b457db31052617485749d43964980e
parent3865303f37b9e495bfe1fd0e36e6fbb5ff628eaf (diff)
downloadayatana-ido-0dfd8e6fea5b4c2bf6030ddc535ee06d8f2da744.tar.gz
ayatana-ido-0dfd8e6fea5b4c2bf6030ddc535ee06d8f2da744.tar.bz2
ayatana-ido-0dfd8e6fea5b4c2bf6030ddc535ee06d8f2da744.zip
Button press event fixes.
-rw-r--r--src/idoentrymenuitem.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/idoentrymenuitem.c b/src/idoentrymenuitem.c
index 5a1cb42..ff90544 100644
--- a/src/idoentrymenuitem.c
+++ b/src/idoentrymenuitem.c
@@ -171,18 +171,23 @@ static gboolean
ido_entry_menu_item_button_press (GtkWidget *widget,
GdkEventButton *event)
{
- GtkWidget *entry;
+ if (event->button == GDK_BUTTON_PRESS)
+ {
+ GtkWidget *entry;
- entry = IDO_ENTRY_MENU_ITEM (widget)->priv->entry;
+ entry = IDO_ENTRY_MENU_ITEM (widget)->priv->entry;
- if (entry->window != NULL)
- {
- gdk_window_raise (entry->window);
- }
+ if (entry->window != NULL)
+ {
+ gdk_window_raise (entry->window);
+ }
- if (!GTK_WIDGET_HAS_FOCUS (entry))
- {
- gtk_widget_grab_focus (entry);
+ if (!GTK_WIDGET_HAS_FOCUS (entry))
+ {
+ gtk_widget_grab_focus (entry);
+ }
+
+ return TRUE;
}
return FALSE;