window: Implement asynchronous popup moving
This commits adds support on the MetaWindow and constraints engine side for asynchronously repositioning a window with a placement rule, either due to environmental changes (e.g. parent moved) or explicitly done so via `meta_window_update_placement_rule()`. This is so far unused, as placement rules where this functionality is triggered are not yet constructed by the xdg-shell implementation, and no users of `meta_window_update_placement_rule()` exists yet. To summarize, it works by making it possible to produce placement rules with the parent rectangle a window should be placed against, while creating a pending configuration that is not applied until acknowledged by the client using the xdg-shell configure/ack_configure mechanisms. An "temporary" constrain result is added to deal with situations where the client window *must* move immediately even though it has not yet acknowledged a new configuration that was sent. This happens for example when the parent window is moved, causing the popup window to change its relative position e.g. because it ended up partially off-screen. In this situation, the temporary position corresponds to the result of the movement of the parent, while the pending (asynchronously configured) position is the relative one given the new constraining result. https://gitlab.gnome.org/GNOME/mutter/merge_requests/705
This commit is contained in:

committed by
Carlos Garnacho

parent
6c82feb1b8
commit
d08a8de265
@ -32,6 +32,7 @@ void meta_window_constrain (MetaWindow *window,
|
||||
MetaGravity resize_gravity,
|
||||
const MetaRectangle *orig,
|
||||
MetaRectangle *new,
|
||||
MetaRectangle *intermediate,
|
||||
int *rel_x,
|
||||
int *rel_y);
|
||||
|
||||
|
Reference in New Issue
Block a user