Prototype clients management with windows
This commit is contained in:
parent
8bcb31ddc2
commit
fe47e27d98
18
features/layout/manage.feature
Normal file
18
features/layout/manage.feature
Normal file
@ -0,0 +1,18 @@
|
||||
Feature: layout client management
|
||||
|
||||
Scenario: sends the #<< message when telling the layout to manage a client
|
||||
Given a file named layout.rb with:
|
||||
"""
|
||||
class Layout
|
||||
def register *_; end
|
||||
|
||||
def << client
|
||||
# FIXME: need the Manager to manage state with clients, not windows
|
||||
#puts client.wname
|
||||
puts client.name
|
||||
end
|
||||
end
|
||||
"""
|
||||
And uhwm is running with options -v -r./layout -l Layout
|
||||
When a window requests to be mapped
|
||||
Then the output must contain the window name
|
@ -27,3 +27,7 @@ end
|
||||
Then /^the output must contain current display$/ do
|
||||
uhwm_wait_output ENV['DISPLAY']
|
||||
end
|
||||
|
||||
Then /^the output must contain the window name$/ do
|
||||
uhwm_wait_output x_window_name
|
||||
end
|
||||
|
@ -6,6 +6,10 @@ Given /^uhwm is running$/ do
|
||||
uhwm_run_wait_ready
|
||||
end
|
||||
|
||||
Given /^uhwm is running with options? (-.+)$/ do |options|
|
||||
uhwm_run_wait_ready options
|
||||
end
|
||||
|
||||
Given /^uhwm is running with this run control file:$/ do |rc|
|
||||
write_file '.uhwmrc.rb', rc
|
||||
uhwm_run_wait_ready
|
||||
|
@ -2,6 +2,10 @@ When /^I press the ([^ ]+) keys?$/ do |keys|
|
||||
x_key keys
|
||||
end
|
||||
|
||||
When /^a window requests to be mapped$/ do
|
||||
x_window_map
|
||||
end
|
||||
|
||||
Then /^it must connect to X display$/ do
|
||||
uhwm_wait_output 'Connected to'
|
||||
expect(x_socket_check uhwm_pid).to be true
|
||||
|
@ -66,6 +66,14 @@ module Uh
|
||||
`sockstat -u`.lines.grep /\s+ruby.+\s+#{pid}/
|
||||
end.any?
|
||||
end
|
||||
|
||||
def x_window_name
|
||||
'Event Tester'
|
||||
end
|
||||
|
||||
def x_window_map
|
||||
spawn 'xev -event owner_grab_button'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user