i3test: fix get_focused() docs (Thanks knopwob)

This commit is contained in:
Michael Stapelberg 2013-02-07 15:57:15 +01:00
parent be287876d6
commit a1774e78fc
1 changed files with 10 additions and 1 deletions

View File

@ -529,10 +529,19 @@ sub get_ws_content {
Returns the container ID of the currently focused container on C<$workspace>. Returns the container ID of the currently focused container on C<$workspace>.
Note that the container ID is B<not> the X11 window ID, so comparing the result
of C<get_focused> with a window's C<< ->{id} >> property does B<not> work.
my $ws = fresh_workspace; my $ws = fresh_workspace;
my $first_window = open_window; my $first_window = open_window;
my $first_id = get_focused();
my $second_window = open_window; 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 =cut
sub get_focused { sub get_focused {