determine_client_spatial_attributes

Function determine_client_spatial_attributes 

fn determine_client_spatial_attributes(
    index: i32,
    number_of_consoles: i32,
    workspace_area: &WorkspaceArea,
    aspect_ratio_adjustment: f64,
) -> (i32, i32, i32, i32)
Expand description

Calculates the position and dimensions for a client window given its index, the total number of clients and the aspect_ratio_adjustment daemon configuration.

§Arguments

  • index - The index of the client in the list of all clients.
  • number_of_consoles - The total number of active client console windows.
  • workspace_area - The available workspace area on the primary monitor minus the space occupied by the daemon console window.
  • aspect_ratio_adjustment - The aspect_ratio_adjustment daemon configuration.
    • > 0.0 - Aims for vertical rectangle shape. The larger the value, the more exaggerated the “verticality”. Eventually the windows will all be columns.
    • = 0.0 - Aims for square shape.
    • < 0.0 - Aims for horizontal rectangle shape. The smaller the value, the more exaggerated the “horizontality”. Eventually the windows will all be rows. -1.0 is the sweetspot for mostly preserving a 16:9 ratio.