Refactor Manager
This commit is contained in:
parent
4e4b15871e
commit
eaa1d279dc
@ -67,15 +67,13 @@ module Uh
|
||||
if client.unmap_count > 0
|
||||
client.unmap_count -= 1
|
||||
else
|
||||
@clients.delete client
|
||||
@events.emit :unmanage, args: client
|
||||
unmanage client
|
||||
end
|
||||
end
|
||||
|
||||
def destroy window
|
||||
return unless client = client_for(window)
|
||||
@clients.delete client
|
||||
@events.emit :unmanage, args: client
|
||||
unmanage client
|
||||
end
|
||||
|
||||
def update_properties window
|
||||
@ -140,6 +138,11 @@ module Uh
|
||||
@clients.find { |e| e.window == window }
|
||||
end
|
||||
|
||||
def unmanage client
|
||||
@clients.delete client
|
||||
@events.emit :unmanage, args: client
|
||||
end
|
||||
|
||||
def check_other_wm!
|
||||
Display.on_error { fail OtherWMRunningError }
|
||||
@display.listen_events INPUT_MASK
|
||||
|
Loading…
x
Reference in New Issue
Block a user