constraints: Pass constrained relative coordinates to window impl

A placement rule placed window positions itself relative to its parent,
thus converting between relative coordinates to absolute coordinates,
then back to relative coordinates implies unwanted restrictions for
example when the absolute coordinate should not be calculated againts
the current parent window position.

Deal with this by keeping track of the relative position all the way
from the constraining engine to the move-resize window implementation.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
This commit is contained in:
Jonas Ådahl
2020-02-14 08:52:48 +01:00
committed by Carlos Garnacho
parent 05e9d6ab9e
commit ff381d1d52
6 changed files with 86 additions and 23 deletions

View File

@ -31,6 +31,8 @@ void meta_window_constrain (MetaWindow *window,
MetaMoveResizeFlags flags,
int resize_gravity,
const MetaRectangle *orig,
MetaRectangle *new);
MetaRectangle *new,
int *rel_x,
int *rel_y);
#endif /* META_CONSTRAINTS_H */