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