aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-10-18 16:26:01 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-10-18 22:37:42 +0200
commit8355884fbd4ea04203614172424b27c5b74018ab (patch)
treec7decf05e32202d1230924a7ddb5af6dd903016c /include
parenttransaction: don't reconfigure X views unless integral coords changed (diff)
downloadsway-8355884fbd4ea04203614172424b27c5b74018ab.tar.gz
sway-8355884fbd4ea04203614172424b27c5b74018ab.tar.zst
sway-8355884fbd4ea04203614172424b27c5b74018ab.zip
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')
-rw-r--r--include/sway/desktop/transaction.h12
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,
38 38
39/** 39/**
40 * Notify the transaction system that a view is ready for the new layout, but 40 * Notify the transaction system that a view is ready for the new layout, but
41 * identifying the instruction by width and height rather than by serial. 41 * identifying the instruction by geometry rather than by serial.
42 * 42 *
43 * This is used by xwayland views, as they don't have serials. 43 * This is used by xwayland views, as they don't have serials.
44 */ 44 */
45void transaction_notify_view_ready_by_size(struct sway_view *view, 45void transaction_notify_view_ready_by_geometry(struct sway_view *view,
46 int width, int height); 46 double x, double y, int width, int height);
47
48/**
49 * Unconditionally notify the transaction system that a view is ready for the
50 * new layout.
51 */
52void transaction_notify_view_ready_immediately(struct sway_view *view);
47 53
48#endif 54#endif