Implement `kill' action keyword
When invoked, will kill the client returned by `layout.current_client`. ICCCM WM_DELETE_WINDOW is used instead if the window reports to support this protocol.
This commit is contained in:
11
features/actions/kill.feature
Normal file
11
features/actions/kill.feature
Normal file
@@ -0,0 +1,11 @@
|
||||
Feature: `kill' action keyword
|
||||
|
||||
@icccm_window
|
||||
Scenario: kills current client
|
||||
Given uhwm is running with this run control file:
|
||||
"""
|
||||
key(:f) { kill_current }
|
||||
"""
|
||||
And an ICCCM compliant window is mapped
|
||||
When I press the alt+f keys
|
||||
Then the ICCCM window must be unmapped by the manager
|
@@ -1,3 +1,10 @@
|
||||
Given /^an ICCCM compliant window is mapped$/ do
|
||||
icccm_window_start
|
||||
timeout_until 'window not mapped after %d seconds' do
|
||||
x_window_map_state(icccm_window_name) == 'IsViewable'
|
||||
end
|
||||
end
|
||||
|
||||
Given /^a(?:\s(\w+))? window is mapped$/ do |ident|
|
||||
x_client(ident).map.sync
|
||||
timeout_until 'window not mapped after %d seconds' do
|
||||
@@ -42,6 +49,10 @@ Then /^the(?:\s(\w+))? window must be mapped$/ do |ident|
|
||||
end
|
||||
end
|
||||
|
||||
Then /^the ICCCM window must be unmapped by the manager$/ do
|
||||
uhwm_wait_output /unmanag.+#{icccm_window_name}/i
|
||||
end
|
||||
|
||||
Then /^the window must be focused$/ do
|
||||
timeout_until 'window not focused after %d seconds' do
|
||||
x_focused_window_id == x_client.window_id
|
||||
|
Reference in New Issue
Block a user