diff --git a/features/support/env.rb b/features/support/env.rb index 09a839c..b8b9828 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -21,6 +21,7 @@ end After do uhwm_ensure_stop + x_windows_ensure_stop end Around '@other_wm_running' do |_, block| diff --git a/lib/uh/wm/testing/acceptance_helpers.rb b/lib/uh/wm/testing/acceptance_helpers.rb index 27a0bfb..7bf2c30 100644 --- a/lib/uh/wm/testing/acceptance_helpers.rb +++ b/lib/uh/wm/testing/acceptance_helpers.rb @@ -72,7 +72,12 @@ module Uh end def x_window_map - spawn 'xev -event owner_grab_button' + @x_window = ChildProcess.build(*%w[xev -event owner_grab_button]) + @x_window.start + end + + def x_windows_ensure_stop + @x_window and @x_window.stop end end end