Enum xdg_positioner_constraint_adjustment
Defined in File xdg-shell-client-protocol.h
Enum Documentation
-
enum xdg_positioner_constraint_adjustment
constraint adjustments
The constraint adjustment value define ways the compositor will adjust the position of the surface, if the unadjusted position would result in the surface being partly constrained.
Whether a surface is considered ‘constrained’ is left to the compositor to determine. For example, the surface may be partly outside the compositor’s defined ‘work area’, thus necessitating the child surface’s position be adjusted until it is entirely inside the work area.
The adjustments can be combined, according to a defined precedence: 1) Flip, 2) Slide, 3) Resize.
Values:
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE
don’t move the child surface when constrained
Don’t alter the surface position even if it is constrained on some axis, for example partially outside the edge of an output.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X
move along the x axis until unconstrained
Slide the surface along the x axis until it is no longer constrained.
First try to slide towards the direction of the gravity on the x axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.
Then try to slide towards the opposite direction of the gravity on the x axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y
move along the y axis until unconstrained
Slide the surface along the y axis until it is no longer constrained.
First try to slide towards the direction of the gravity on the y axis until either the edge in the opposite direction of the gravity is unconstrained or the edge in the direction of the gravity is constrained.
Then try to slide towards the opposite direction of the gravity on the y axis until either the edge in the direction of the gravity is unconstrained or the edge in the opposite direction of the gravity is constrained.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X
invert the anchor and gravity on the x axis
Invert the anchor and gravity on the x axis if the surface is constrained on the x axis. For example, if the left edge of the surface is constrained, the gravity is ‘left’ and the anchor is ‘left’, change the gravity to ‘right’ and the anchor to ‘right’.
If the adjusted position also ends up being constrained, the resulting position of the flip_x adjustment will be the one before the adjustment.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y
invert the anchor and gravity on the y axis
Invert the anchor and gravity on the y axis if the surface is constrained on the y axis. For example, if the bottom edge of the surface is constrained, the gravity is ‘bottom’ and the anchor is ‘bottom’, change the gravity to ‘top’ and the anchor to ‘top’.
The adjusted position is calculated given the original anchor rectangle and offset, but with the new flipped anchor and gravity values.
If the adjusted position also ends up being constrained, the resulting position of the flip_y adjustment will be the one before the adjustment.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X
horizontally resize the surface
Resize the surface horizontally so that it is completely unconstrained.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y
vertically resize the surface
Resize the surface vertically so that it is completely unconstrained.
-
enumerator XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE