Skip to content
  • Vlad Zahorodnii's avatar
    wayland: Relax conditions in strut edge heuristics · 8b4ffd5c
    Vlad Zahorodnii authored
    When the output layout changes, it's possible that the bottom panel
    will float in the middle of the screen, e.g. left edge of the panel
    touches the left screen edge while top and bottom panel edges touch no
    screen edge.
    
    In that case, XdgToplevelWindow::strutRect() will erroneously indicate
    that the left strut rect is valid, while it's not.
    
    Since the strut area is garbage, Window::checkWorkspacePosition() may
    incorrectly move and resize windows during output layout change.
    
    The proposed heuristic will fail with square panels, but those are rare
    and the only way to detect the correct strut area would be to use the
    layer shell protocol.
    8b4ffd5c