diff -ru ratpoison/src/actions.c ratpoison/src/actions.c --- ratpoison/src/actions.c Thu Feb 15 09:06:46 2001 +++ ratpoison/src/actions.c Fri Feb 16 14:39:37 2001 @@ -548,8 +548,27 @@ goto_window_number (void *data) { int n = (int)data; + int o = rp_current_window->number; + int s_len; + char *s; rp_window *win; + + if (o == n) + { + /* Display window list to indicate failure. */ + /* FIXME: We can always assume there is 1 screen, but which one + is the active one? Need to test on multi-screen x-servers. */ + + s_len = strlen(MESSAGE_THIS_IS_WINDOW) + 10 /* n */ + strlen(rp_current_window->name) + 6 /* " ()." */; + + if(!(s = malloc(s_len + 1))) + return; + + snprintf(s, s_len, "%s%d (%s).", MESSAGE_THIS_IS_WINDOW, o, rp_current_window->name); + display_msg_in_bar (rp_current_window->scr, s, 0, 0); + return; + } if ((win = find_window_by_number (n)) == NULL) { diff -ru ratpoison/src/messages.h this_is_window/src/messages.h --- ratpoison/src/messages.h Thu Feb 15 22:49:44 2001 +++ this_is_window/src/messages.h Fri Feb 16 13:43:45 2001 @@ -25,6 +25,7 @@ #include "config.h" #define MESSAGE_NO_OTHER_WINDOW " No other window " +#define MESSAGE_THIS_IS_WINDOW " This IS window " #define MESSAGE_NO_MANAGED_WINDOWS " No managed windows " #define MESSAGE_UNKNOWN_COMMAND ": unknown command "