From 8355884fbd4ea04203614172424b27c5b74018ab Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sun, 18 Oct 2020 16:26:01 -0400 Subject: 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. --- include/sway/desktop/transaction.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') 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 -- cgit v1.2.3-54-g00ecf