--- gui/greeter/greeter_item_pam.c	2003-12-11 00:42:02.000000000 +0530
+++ gui/greeter/greeter_item_pam.c-new	2004-08-03 14:07:32.968428176 +0530
@@ -24,6 +24,8 @@
 gchar *greeter_current_user = NULL;
 
 gboolean require_quarter = FALSE;
+gboolean passwd_entry = FALSE;
+gint entry_val = 0;
 
 extern gboolean greeter_probably_login_prompt;
 
@@ -78,7 +80,18 @@
   char *tmp;
   GreeterItemInfo *error_info;
 
+  /* To enable the TAB feature we have to check if it is a 
+     password entry or not. If it is a password entry then 
+     TAB shouldn't work in default way. */
+
+  if ((entry_val % 2) == 0)
+     passwd_entry = TRUE;
+  else
+     passwd_entry = FALSE;
+  entry_val++;
+
   str = gtk_entry_get_text (GTK_ENTRY (entry));
+	
   if (greeter_probably_login_prompt &&
       /* evilness */
       evil (entry, str))
@@ -117,6 +130,25 @@
   g_free (tmp);
 }
 
+static void
+user_pw_changed (GtkEntry *e, GreeterItemInfo *info)
+{
+	char *txt;
+
+	if (passwd_entry)
+		return;
+
+	txt = (char *)gtk_entry_get_text (GTK_ENTRY (e));
+	if (txt[strlen (txt) - 1] == '\t') {
+		txt[strlen (txt) - 1] = '\0';
+		gtk_entry_set_text (GTK_ENTRY (e), txt);
+		user_pw_activate (e, info);
+	}
+
+	return;
+
+}
+
 static gboolean
 key_press_event (GtkWidget *entry, GdkEventKey *event, gpointer data)
 {
@@ -159,6 +191,8 @@
           gtk_widget_set_sensitive (entry, FALSE);
 	}
 
+      g_signal_connect (entry, "changed",
+			G_CALLBACK (user_pw_changed), entry_info);
       g_signal_connect (entry, "activate",
 			G_CALLBACK (user_pw_activate), entry_info);
       g_signal_connect (G_OBJECT (entry), "key_press_event",

