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. --- sway/desktop/xdg_shell.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sway/desktop/xdg_shell.c') diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 03f37241..4d133a12 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -302,8 +302,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); desktop_damage_view(view); transaction_commit_dirty(); - transaction_notify_view_ready_by_size(view, - new_geo.width, new_geo.height); + transaction_notify_view_ready_immediately(view); } else { memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); } -- cgit v1.2.3