From a1774e78fcdcb612c15d8666c98655e32d7ea90b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 7 Feb 2013 15:57:15 +0100 Subject: [PATCH] i3test: fix get_focused() docs (Thanks knopwob) --- testcases/lib/i3test.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 12f81ea1..d6d71b23 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -529,10 +529,19 @@ sub get_ws_content { Returns the container ID of the currently focused container on C<$workspace>. +Note that the container ID is B the X11 window ID, so comparing the result +of C with a window's C<< ->{id} >> property does B work. + my $ws = fresh_workspace; my $first_window = open_window; + my $first_id = get_focused(); + my $second_window = open_window; - is(get_focused($ws), $second_window, 'second window focused'); + my $second_id = get_focused(); + + cmd 'focus left'; + + is(get_focused($ws), $first_id, 'second window focused'); =cut sub get_focused {