# File lib/rumai/wm.rb, line 634 def arrange_in_grid aMaxClientsPerColumn = nil # compute client distribution unless aMaxClientsPerColumn numClients = num_managed_clients return unless numClients > 0 numColumns = Math.sqrt(numClients) aMaxClientsPerColumn = (numClients / numColumns).round end return unless aMaxClientsPerColumn > 1 # apply the distribution each_column do |a| a.length = aMaxClientsPerColumn a.layout = :default end end