summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2005-04-19 02:47:55 +0000
committerBrian Cameron <bcameron@src.gnome.org>2005-04-19 02:47:55 +0000
commita109574905c8a975e9c3a5ce0c892e7b451348ee (patch)
treedb7dc16220d7204484d3c362f4099dbd745bc055 /gui
parenta5a49a58eefc4fb9a00e7f804b48228ab2060c89 (diff)
downloadgdm-a109574905c8a975e9c3a5ce0c892e7b451348ee.tar.gz
I noticed that double clicking in the Face Browser was causing the focus
2005-04-18 Brian Cameron <brian.cameron@sun.com> * gui/gdmlogin.c, gui/greeter/greeter_item_ulist.c: I noticed that double clicking in the Face Browser was causing the focus to be taken away from the username/password entry field. I added a button-release-event listener that returns the focus back to the entry field when the user clicks on the Face Browser. This ensures that the focus is always kept on the entry field where it should be.
Diffstat (limited to 'gui')
-rw-r--r--gui/gdmlogin.c10
-rw-r--r--gui/greeter/greeter_item_ulist.c10
2 files changed, 20 insertions, 0 deletions
diff --git a/gui/gdmlogin.c b/gui/gdmlogin.c
index 41dedefe..dda5656d 100644
--- a/gui/gdmlogin.c
+++ b/gui/gdmlogin.c
@@ -2453,6 +2453,12 @@ user_selected (GtkTreeSelection *selection, gpointer data)
}
}
+static void
+browser_change_focus (GtkWidget *widget, GdkEventButton *event, gpointer data)
+{
+ gtk_widget_grab_focus (entry);
+}
+
static gboolean
gdm_login_handle_pressed (GtkWidget *widget, GdkEventButton *event)
{
@@ -2946,6 +2952,10 @@ gdm_login_gui_init (void)
G_CALLBACK (user_selected),
NULL);
+ g_signal_connect (browser, "button_release_event",
+ G_CALLBACK (browser_change_focus),
+ NULL);
+
browser_model = (GtkTreeModel *)gtk_list_store_new (3,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,
diff --git a/gui/greeter/greeter_item_ulist.c b/gui/greeter/greeter_item_ulist.c
index c54087f1..7f0b0a7f 100644
--- a/gui/greeter/greeter_item_ulist.c
+++ b/gui/greeter/greeter_item_ulist.c
@@ -166,6 +166,12 @@ user_selected (GtkTreeSelection *selection, gpointer data)
}
static void
+browser_change_focus (GtkWidget *widget, GdkEventButton *event, gpointer data)
+{
+ gtk_widget_grab_focus (pam_entry);
+}
+
+static void
greeter_generate_userlist (GtkWidget *tv)
{
GtkTreeModel *tm;
@@ -185,6 +191,10 @@ greeter_generate_userlist (GtkWidget *tv)
G_CALLBACK (user_selected),
NULL);
+ g_signal_connect (GTK_TREE_VIEW (tv), "button_release_event",
+ G_CALLBACK (browser_change_focus),
+ NULL);
+
tm = (GtkTreeModel *)gtk_list_store_new (3,
GDK_TYPE_PIXBUF,
G_TYPE_STRING,