• Jonas Ådahl's avatar
    menu: Don't constrain initial menu size · 00486efd
    Jonas Ådahl authored
    Don't constrain the initial menu size by the work area of some monitor;
    instead let the move_to_rect() logic in the backend do the constraining.
    This fixes two things:
    1) The anchor delta provided to the backend will not be invalid. The
    delta is calculated by looking at the active menu item, calculating the
    offset given that, but since we clamped the window size before showing
    the window, the delta became invalid. This caused visible issues when
    the delta was large enough to make the initially calculated popup window
    geometry to be placed outside the geometry of the parent window, which
    is a violation of the Wayland protocol.
    2) The scroll offset to be correct when receiving the positioning
    feedback. While the scroll offset was based on the pre-clamped window
    size, the feedback, which was used to calculate the new offset, was not,
    causing the scroll offset to be clamped as well.
gtkwindowprivate.h 7.63 KB