• Nicholas Hollingum's avatar
    Fixed some limitations in Exo's popup placement. · 90e2e300
    Nicholas Hollingum authored
    Exo could not handle some cases of popup placement, particularly when
    the new window would be too large to fit on screen.
    
    This CL reworks the implementation in some ways:
     - We break the placement problem down into two 1D problems, which
       minimises code duplication.
     - We respect the transformation order specified in the wayland spec,
       i.e. flip > slide > resize.
     - We maximize the visibility of the popup subject to the above, so
       when no valid transformations result in an unconstrained window, we
       choose the transformations that make the popup most visible.
     - We handle the case of resize, where previously only the top-left
       corner of the popup could be chosen.
     - We properly send the configuration callback, to inform the popup
       surface of its actual placement.
    
    Bug: 942859
    Change-Id: I892678492047ac2849afa84b1004731b7decab92
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588058
    Commit-Queue: Nic Hollingum <hollingum@google.com>
    Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#659400}
    90e2e300
wayland_positioner.h 2.11 KB