Skip to content

xdg-positioner

Simon Ser requested to merge github/fork/acrisci/xdg-positioner into master

Created by: acrisci

Let's try to make the xdg-positioner work properly. This specifies what to do when a popup is constrained. A popup is constrained when part of it is not visible such as when it intersects the edge of an output.

TODO:

  • store positioner properties on the popup state
  • popup constraint detection
  • find test clients
  • flip_x, flip_y
    • the popup flips to the other side of its parent
  • slide_x, slide_y
    • the popup moves over until it is not constrained
  • resize_x, resize_y
    • the popup resizes so it fits the screen bounds
  • port to xdg-shell stable
  • wlroots library abstractions

xdg-positioner can specify to do all three of these (in the order presented above) until it is no longer constrained (which should always happen at or before the resize step.

The actual moving/resizing must happen in rootston because only it knows when the popup is constrained.

Fixes #684 (closed) Fixes #231 (closed)

Test plan:

  • test flip: open a popup so that it would be constrained on the side of the screen, but filpping it (reversing appropriate x/y direction and gravity) would have the popup unconstrained, then the popup should do the flip. Do this for each edge of the output and also for nested popups.
  • test slide: open a popup so that it would be constrained on the side of the screen, but flipping it will not unconstrain the popup (e.g., if the anchor point is very close to the edge), then it should slide along the axis and still be visible on the screen. (test for each edge of the output and for nested popups).

There should never be a case where a popup with every flag has some portion of the popup not visible on the screen.

Merge request reports