aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2020-10-18 16:26:01 -0400
committerFurkan Sahin <furkan-dev@proton.me>2020-10-18 16:26:01 -0400
commitf1d422ed6f1ab9730871efad8136595192ab098d (patch)
treec7decf05e32202d1230924a7ddb5af6dd903016c /include
parent425dc0e492cd3956804d2e17a3c77b41a422a33f (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 520067f 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,
/**
* 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