From 9a5d664f51d43723d03039963b5761924446102a Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sun, 4 Aug 2024 13:02:37 -0400 Subject: [PATCH] transaction: Allow no popup descriptor in popup list Input method popups in the future will destroy the scene descriptor when it isn't mapped and therefore shouldn't be tampered with here. --- sway/desktop/transaction.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 7568990bf..2f70cd513 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -612,9 +612,11 @@ void arrange_popups(struct wlr_scene_tree *popups) { struct sway_popup_desc *popup = scene_descriptor_try_get(node, SWAY_SCENE_DESC_POPUP); - int lx, ly; - wlr_scene_node_coords(popup->relative, &lx, &ly); - wlr_scene_node_set_position(node, lx, ly); + if (popup) { + int lx, ly; + wlr_scene_node_coords(popup->relative, &lx, &ly); + wlr_scene_node_set_position(node, lx, ly); + } } }