diff options
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r-- | sway/desktop/transaction.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index acc3e3f9..042141ab 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c | |||
@@ -1,4 +1,3 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | ||
2 | #include <stdbool.h> | 1 | #include <stdbool.h> |
3 | #include <stdlib.h> | 2 | #include <stdlib.h> |
4 | #include <string.h> | 3 | #include <string.h> |
@@ -606,21 +605,15 @@ static void arrange_output(struct sway_output *output, int width, int height) { | |||
606 | } | 605 | } |
607 | } | 606 | } |
608 | 607 | ||
609 | static void arrange_popup(struct wlr_scene_tree *popup) { | 608 | void arrange_popups(struct wlr_scene_tree *popups) { |
610 | struct wlr_scene_node *node; | 609 | struct wlr_scene_node *node; |
611 | wl_list_for_each(node, &popup->children, link) { | 610 | wl_list_for_each(node, &popups->children, link) { |
612 | struct sway_xdg_popup *popup = scene_descriptor_try_get(node, | 611 | struct sway_popup_desc *popup = scene_descriptor_try_get(node, |
613 | SWAY_SCENE_DESC_POPUP); | 612 | SWAY_SCENE_DESC_POPUP); |
614 | 613 | ||
615 | // the popup layer may have popups from layer_shell surfaces, in this | 614 | int lx, ly; |
616 | // case those don't have a scene descriptor, so lets skip those here. | 615 | wlr_scene_node_coords(popup->relative, &lx, &ly); |
617 | if (popup) { | 616 | wlr_scene_node_set_position(node, lx, ly); |
618 | struct wlr_scene_tree *tree = popup->view->content_tree; | ||
619 | |||
620 | int lx, ly; | ||
621 | wlr_scene_node_coords(&tree->node, &lx, &ly); | ||
622 | wlr_scene_node_set_position(&popup->scene_tree->node, lx, ly); | ||
623 | } | ||
624 | } | 617 | } |
625 | } | 618 | } |
626 | 619 | ||
@@ -679,7 +672,7 @@ static void arrange_root(struct sway_root *root) { | |||
679 | } | 672 | } |
680 | } | 673 | } |
681 | 674 | ||
682 | arrange_popup(root->layers.popup); | 675 | arrange_popups(root->layers.popup); |
683 | } | 676 | } |
684 | 677 | ||
685 | /** | 678 | /** |