From 6f0409e582148c7611133cb1116c934ff312b204 Mon Sep 17 00:00:00 2001 From: sabetts Date: Thu, 20 May 2004 05:23:02 +0000 Subject: (format_window_name): add %f format option --- src/window.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/window.c b/src/window.c index c39142a..8e71afb 100644 --- a/src/window.c +++ b/src/window.c @@ -329,7 +329,6 @@ give_window_focus (rp_window *win, rp_window *last_win) counter++; win->last_access = counter; - unhide_window (win); if (defaults.warp) @@ -544,6 +543,7 @@ print_window_information (rp_window *win) %c - resource class %i - X11 Window ID %l - last access number + %f - print the frame number the window is in */ static void @@ -607,6 +607,16 @@ format_window_name (char *fmt, rp_window_elem *win_elem, rp_window *other_win, sbuf_concat (buffer, dbuf); break; + case 'f': + if (win_elem->win->frame_number != EMPTY) + { + snprintf (dbuf, 9, "%d", win_elem->win->frame_number); + sbuf_concat (buffer, dbuf); + } + else + sbuf_concat (buffer, " "); + break; + case '%': sbuf_concat (buffer, "%"); break; -- cgit v1.2.3