Add remote commands support
This commit is contained in:
@@ -20,12 +20,15 @@ def handle_event(event)
|
||||
|
||||
|
||||
when :create
|
||||
$all_windows << event[:window]
|
||||
return unless event[:override_redirect].zero?
|
||||
X.subscribe event[:window]
|
||||
|
||||
|
||||
when :closed
|
||||
$all_windows.delete event[:window]
|
||||
$windows[event[:window]]&.delete
|
||||
X.focus $root
|
||||
|
||||
|
||||
when :enter
|
||||
@@ -37,6 +40,10 @@ def handle_event(event)
|
||||
if $windows[event[:window]].nil?
|
||||
monitor[:workspaces][monitor[:selected_workspace]].create event[:window]
|
||||
X.show event[:window]
|
||||
$all_windows.each do |window|
|
||||
above = `xprop -id #{window} _NET_WM_STATE`
|
||||
X.send_to_top window if above.include?("ABOVE")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user