Test how manager should handle destroyed windows
This commit is contained in:
parent
e97dcea87a
commit
29f2b4725d
@ -1,7 +1,13 @@
|
||||
Feature: manager client unmanagement
|
||||
|
||||
Scenario: logs when a new client is unmanaged
|
||||
Background:
|
||||
Given uhwm is running
|
||||
And a window is mapped
|
||||
|
||||
Scenario: logs when a new client is unmanaged
|
||||
When the window requests to be unmapped
|
||||
Then the output must match /unmanag.+xclient/i
|
||||
|
||||
Scenario: unmanages client on destroy notify X events
|
||||
When the window is destroyed
|
||||
Then the output must match /unmanag.+xclient/i
|
||||
|
@ -26,6 +26,10 @@ When /^a window requests to be mapped (\d+) times$/ do |times|
|
||||
x_window_map times: times.to_i
|
||||
end
|
||||
|
||||
When /^the window is destroyed$/ do
|
||||
x_window_destroy
|
||||
end
|
||||
|
||||
Then /^it must connect to X display$/ do
|
||||
uhwm_wait_output 'Connected to'
|
||||
expect(x_socket_check uhwm_pid).to be true
|
||||
|
@ -106,6 +106,11 @@ module Uh
|
||||
x_client(options).sync
|
||||
end
|
||||
|
||||
def x_window_destroy **options
|
||||
x_client(options).destroy
|
||||
x_client(options).sync
|
||||
end
|
||||
|
||||
def x_clients_ensure_stop
|
||||
@x_clients and @x_clients.any? and @x_clients.values.each &:terminate
|
||||
end
|
||||
@ -177,6 +182,11 @@ module Uh
|
||||
window.unmap
|
||||
self
|
||||
end
|
||||
|
||||
def destroy
|
||||
window.destroy
|
||||
self
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user