Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework the gaps code so sizes are correct and to prevent broken layouts #4298

Closed
wants to merge 4 commits into from

Commits on Jun 30, 2019

  1. Make inner gaps apply evenly across all windows

    To make sure inner gaps don't generate unequally sized windows always
    apply a total of one inner gap to all children. Doing just this would
    result in half-gaps around the workspace border so compensate for that
    by adding gaps to the workspace.
    
    Fixes swaywm#4296
    pedrocr committed Jun 30, 2019
    Configuration menu
    Copy the full SHA
    5c0396b View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2019

  1. Limit inner gaps to sensible values

    Large inner gaps can lead to broken rendering with width/height going
    negative. Limit the gaps so that they never make the windows smaller
    than a minimum sensible size (the same used for the resize command).
    
    Fixes swaywm#4294
    pedrocr committed Jul 4, 2019
    Configuration menu
    Copy the full SHA
    b589767 View commit details
    Browse the repository at this point in the history
  2. Limit outer gaps to sensible values

    Just like with inner gaps, outer gaps must be capped so that the
    workspace doesn't run out of space. Since here we have different gaps in
    all four directions clamp them in a way that at least maintains the
    relative sizing of the gaps vertically and horizontally.
    
    Fixes swaywm#4300
    pedrocr committed Jul 4, 2019
    Configuration menu
    Copy the full SHA
    9cbf3be View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2019

  1. Prevent workspace gaps from ending up negative

    Since outer gaps can be negative we need to robustly prevent the
    resulting gaps from ending up negative. The previous code only did this
    on workspace creation but the gaps can change after that.
    
    Fixes swaywm#4304
    pedrocr committed Jul 5, 2019
    Configuration menu
    Copy the full SHA
    f66eb11 View commit details
    Browse the repository at this point in the history