aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2024-08-04 13:02:37 -0400
committerFurkan Sahin <furkan-dev@proton.me>2024-08-04 13:02:37 -0400
commit08dc3c1aff81f78fee601a4cc03f899c68e3cba1 (patch)
treefe0de8a46e8c45509cb51ad33b5bd62210cc25f7
parentc802f0c577c7e159f53f61ba5d11bcdc3aa05763 (diff)
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.
-rw-r--r--sway/desktop/transaction.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 93118989..8f12832a 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);
+ }
}
}