Handle destroy_notify X events in manager

This commit is contained in:
Thibault Jouan 2015-04-21 02:21:12 +00:00
parent 31a326e7eb
commit e97dcea87a
2 changed files with 13 additions and 0 deletions

View File

@ -109,6 +109,10 @@ module Uh
configure event.window
end
def handle_destroy_notify event
destroy event.window
end
def handle_map_request event
map event.window
end

View File

@ -323,6 +323,15 @@ module Uh
end
end
context 'when destroy_notify event is given' do
let(:event) { double 'event', type: :destroy_notify, window: :window }
it 'destroy the event window' do
expect(manager).to receive(:destroy).with :window
manager.handle event
end
end
context 'when map_request event is given' do
let(:event) { double 'event', type: :map_request, window: :window }