aboutsummaryrefslogtreecommitdiff
path: root/src/idoentrymenuitem.c
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-03-11 11:11:51 -0600
committerCody Russell <crussell@canonical.com>2010-03-11 11:11:51 -0600
commit7561ce13586a6d1549aec43dba138473d50b480b (patch)
treeb73d52df737a8dc047bbe562808e18ff08d313f0 /src/idoentrymenuitem.c
parentcb28301c05117b963e5e7f22747e33d624c302e4 (diff)
parent0dfd8e6fea5b4c2bf6030ddc535ee06d8f2da744 (diff)
downloadayatana-ido-7561ce13586a6d1549aec43dba138473d50b480b.tar.gz
ayatana-ido-7561ce13586a6d1549aec43dba138473d50b480b.tar.bz2
ayatana-ido-7561ce13586a6d1549aec43dba138473d50b480b.zip
Button press event fixes.
Diffstat (limited to 'src/idoentrymenuitem.c')
-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;