diff options
author | Tudor Brindus <me@tbrindus.ca> | 2020-10-18 16:26:01 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-10-18 22:37:42 +0200 |
commit | 8355884fbd4ea04203614172424b27c5b74018ab (patch) | |
tree | c7decf05e32202d1230924a7ddb5af6dd903016c /include/sway/desktop | |
parent | 5bd6a5ce3ff3cb879463646d4f88745420335b23 (diff) |
transaction: validate X transaction completions by geometry, not size
Xwayland views are aware of their coordinates, so validating transaction
completions should take into account the reported coordinates of the
view. Prior to this commit they didn't, and matching dimensions would
suffice to validate the transaction.
Also introduced `transaction_notify_view_ready_immediately` to support
the fix from d0f7e0f without jumping through hoops to figure out the
geometry of an `xdg_shell` view.
Diffstat (limited to 'include/sway/desktop')
-rw-r--r-- | include/sway/desktop/transaction.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/sway/desktop/transaction.h b/include/sway/desktop/transaction.h index 66e8c9a2..175489c5 100644 --- a/include/sway/desktop/transaction.h +++ b/include/sway/desktop/transaction.h @@ -38,11 +38,17 @@ void transaction_notify_view_ready_by_serial(struct sway_view *view, /** * Notify the transaction system that a view is ready for the new layout, but - * identifying the instruction by width and height rather than by serial. + * identifying the instruction by geometry rather than by serial. * * This is used by xwayland views, as they don't have serials. */ -void transaction_notify_view_ready_by_size(struct sway_view *view, - int width, int height); +void transaction_notify_view_ready_by_geometry(struct sway_view *view, + double x, double y, int width, int height); + +/** + * Unconditionally notify the transaction system that a view is ready for the + * new layout. + */ +void transaction_notify_view_ready_immediately(struct sway_view *view); #endif |