Implement Client#focus
This commit is contained in:
parent
3cf62cc07d
commit
b4240a8b4f
@ -48,6 +48,12 @@ module Uh
|
|||||||
@unmap_count += 1
|
@unmap_count += 1
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def focus
|
||||||
|
@window.raise
|
||||||
|
@window.focus
|
||||||
|
self
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -101,6 +101,22 @@ module Uh
|
|||||||
expect(client.hide).to be client
|
expect(client.hide).to be client
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#focus' do
|
||||||
|
it 'raises the window' do
|
||||||
|
expect(window).to receive :raise
|
||||||
|
client.focus
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'focuses the window' do
|
||||||
|
expect(window).to receive :focus
|
||||||
|
client.focus
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'returns self' do
|
||||||
|
expect(client.focus).to be client
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user