From: Benjamin Seidenberg <astronut@dlgeek.net>
Subject: Upstream patch to toggle buddy list focus

diff -urNad pork-0.99.8.1~/src/pork_command.c pork-0.99.8.1/src/pork_command.c
--- pork-0.99.8.1~/src/pork_command.c	2005-04-28 13:35:19.000000000 -0400
+++ pork-0.99.8.1/src/pork_command.c	2006-05-01 20:04:49.000000000 -0400
@@ -1228,6 +1228,7 @@
 	{ "show",			cmd_blist_show			},
 	{ "start",			cmd_blist_start			},
 	{ "toggle",			cmd_blist_toggle		},
+	{ "toggle_focus",	cmd_blist_toggle_focus	},
 	{ "up",				cmd_blist_up			},
 	{ "warn",			cmd_blist_warn			},
 	{ "warn_anon",		cmd_blist_warn_anon		},
@@ -1424,6 +1425,12 @@
 	imwindow_blist_toggle(cur_window());
 }
 
+USER_COMMAND(cmd_blist_toggle_focus) {
+	run_one_command("toggle", CMDSET_BLIST);
+	run_one_command("focus_next", CMDSET_INPUT); 
+	run_one_command("refresh", CMDSET_MAIN); 
+}
+
 USER_COMMAND(cmd_blist_up) {
 	blist_cursor_up(cur_window()->owner->blist);
 }
diff -urNad pork-0.99.8.1~/src/pork_command_defs.h pork-0.99.8.1/src/pork_command_defs.h
--- pork-0.99.8.1~/src/pork_command_defs.h	2005-04-28 13:35:16.000000000 -0400
+++ pork-0.99.8.1/src/pork_command_defs.h	2006-05-01 20:04:49.000000000 -0400
@@ -160,6 +160,7 @@
 USER_COMMAND(cmd_blist_show);
 USER_COMMAND(cmd_blist_start);
 USER_COMMAND(cmd_blist_toggle);
+USER_COMMAND(cmd_blist_toggle_focus);
 USER_COMMAND(cmd_blist_up);
 USER_COMMAND(cmd_blist_warn);
 USER_COMMAND(cmd_blist_warn_anon);
