diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2024-01-23 10:17:26 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-02-12 19:19:22 +0300 |
commit | 1846944f0454fec08ad91a04ab04e3b1ffcd1764 (patch) | |
tree | 76b6cea3f679e8eff228001654fa43a6a9aa8f47 /sway/desktop/xdg_shell.c | |
parent | layer_shell: Arrange popups even if exclusive zone doesn't change (diff) | |
download | sway-1846944f0454fec08ad91a04ab04e3b1ffcd1764.tar.gz sway-1846944f0454fec08ad91a04ab04e3b1ffcd1764.tar.zst sway-1846944f0454fec08ad91a04ab04e3b1ffcd1764.zip |
xdg_shell: Extract struct for popup descriptor
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index d3f69a15..f4a25cf4 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -97,8 +97,11 @@ static struct sway_xdg_popup *popup_create(struct wlr_xdg_popup *wlr_popup, | |||
97 | return NULL; | 97 | return NULL; |
98 | } | 98 | } |
99 | 99 | ||
100 | popup->desc.relative = &view->content_tree->node; | ||
101 | popup->desc.view = view; | ||
102 | |||
100 | if (!scene_descriptor_assign(&popup->scene_tree->node, | 103 | if (!scene_descriptor_assign(&popup->scene_tree->node, |
101 | SWAY_SCENE_DESC_POPUP, popup)) { | 104 | SWAY_SCENE_DESC_POPUP, &popup->desc)) { |
102 | sway_log(SWAY_ERROR, "Failed to allocate a popup scene descriptor"); | 105 | sway_log(SWAY_ERROR, "Failed to allocate a popup scene descriptor"); |
103 | wlr_scene_node_destroy(&popup->scene_tree->node); | 106 | wlr_scene_node_destroy(&popup->scene_tree->node); |
104 | free(popup); | 107 | free(popup); |