Skip to content

XdgPopupWindow: Reposition for non-reactive positioners

Kai Uwe Broulik requested to merge work/kbroulik/xdg-popup-reposition-live into master

Ensures that e.g. context menus move about with their parents when they get moved around.

However, as per spec don't re-constrain the window when its positioner is non-reactive. This change calculates the offset from its parent window once initially and places the window relative to that whenever the parent moves.

Only when the positioner is reactive, will it recalculate the placement fully.

Also: Drop bounds argument from transientPlacement

XdgPopupWindow disregards it for the most part anyway and asks workspace for the placement area directly. Also gives XdgPopupWindow more control on the placement when it's all contained inside of it for the upcoming commit.


Moving around windows with Alt Meta + left mouse button:

  • In GTK 4 Calculator (reactive positioner), its menu flyout moves about with the window and gets re-constrained and nudged about as it touches the screen corners.
  • Qt context menus (non-reactive positioner) get moved about relative to their parent window with a fixed offset, moving off screen if I push them that way
Edited by Kai Uwe Broulik

Merge request reports

Loading