Skip to content
  • Vlad Zahorodnii's avatar
    Compute correct boundaries in checkWorkspacePosition · 67b2746e
    Vlad Zahorodnii authored
    Summary:
    When a client sets a strut, checkWorkspacePosition will be called to
    bump clients that touch corresponding screen edge.
    
    In order to do that, checkWorkspacePosition needs to calculate client
    boundaries before and after the restricted move area was changed. As it
    turns out, if the client reserves space "between" screens, calculated
    boundaries can be incorrect, which may lead to some funky results, e.g.
    shrunken clients.
    
    For example, let's say that there is a dual-monitor setup. If a client
    reserves some amount of space at the right border of the left screen,
    then clients on the right monitor will have rightMax which is equal to
    the x coordinate of screenArea.
    
    To fix that, this change ensures that only restricted areas belonging
    to the same screen as the client are taken into account when computing
    the boundaries.
    
    BUG: 404837
    BUG: 406573
    
    Reviewers: #kwin, davidedmundson
    
    Reviewed By: #kwin, davidedmundson
    
    Subscribers: kwin
    
    Tags: #kwin
    
    Differential Revision: https://phabricator.kde.org/D20987
    67b2746e