forked from Airblader/i3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce GET_BINDING_STATE IPC command
fixes #3892
- Loading branch information
1 parent
50160eb
commit 45feaac
Showing
9 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!perl | ||
# vim:ts=4:sw=4:expandtab | ||
# | ||
# Please read the following documents before working on tests: | ||
# • https://build.i3wm.org/docs/testsuite.html | ||
# (or docs/testsuite) | ||
# | ||
# • https://build.i3wm.org/docs/lib-i3test.html | ||
# (alternatively: perldoc ./testcases/lib/i3test.pm) | ||
# | ||
# • https://build.i3wm.org/docs/ipc.html | ||
# (or docs/ipc) | ||
# | ||
# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf | ||
# (unless you are already familiar with Perl) | ||
# | ||
# Verifies the GET_BINDING_MODE IPC command | ||
# Ticket: #3892 | ||
# Bug still in: 4.18-318-g50160eb1 | ||
use i3test i3_config => <<EOT; | ||
# i3 config file (v4) | ||
font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 | ||
mode "extra" { | ||
bindsym Mod1+x nop foo | ||
} | ||
EOT | ||
|
||
my $i3 = i3(get_socket_path()); | ||
$i3->connect->recv; | ||
# TODO: use the symbolic name for the command/reply type instead of the | ||
# numerical 12: | ||
my $binding_state = $i3->message(12, "")->recv; | ||
is($binding_state->{name}, 'default', 'at startup, binding mode is default'); | ||
|
||
cmd 'mode extra'; | ||
|
||
$binding_state = $i3->message(12, "")->recv; | ||
is($binding_state->{name}, 'extra', 'after switching, binding mode is extra'); | ||
|
||
done_testing; |