diff options
| author | Alexander Orzechowski <alex@ozal.ski> | 2024-08-04 13:02:37 -0400 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2024-09-20 19:48:52 +0200 |
| commit | bb666f2ac9e67df16fed7206c533ae28d4d7d7c0 (patch) | |
| tree | d0459e9f09a027167fe37cf73e0b0571e285c67d | |
| parent | af782c17bb81a0b2370470d94b35fd97296f4cfe (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.
(cherry picked from commit 023f6b0a50dd4fe17a29d7f02922e18ef37df857)
| -rw-r--r-- | sway/desktop/transaction.c | 8 |
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); + } } } |
