Skip to content
  • Vlad Zahorodnii's avatar
    Refactor geometry constraints code · a75fb7f8
    Vlad Zahorodnii authored
    Summary:
    Currently, there are a couple of issues with sizeForClientSize(). First
    of all, we have a method called clientSizeToFrameSize() which does similar
    thing except applying geometry constraints and checking window rules. The
    other issue is that sizeForClientSize() is doing a bit too much, it checks
    window rules, it applies a bunch of geometry constrains. Sometimes it
    does not perform conversion between client sizes and frame sizes!
    
    This change attempts to address those issues by replacing sizeForClientSize
    with two similar methods and changing semantics of some methods of the
    X11Client class.
    
    The most significant difference between sizeForClientSize() and the new
    methods is that neither constrainClientSize() nor constrainFrameSize()
    check window rules. This is up to users of those methods. In many places,
    we don't have to check window rules because we check isResizable(),
    which returns false if the frame size is enforced by a window rule.
    
    Reviewers: #kwin, davide...
    a75fb7f8