aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index acc3e3f9..d1898843 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>
@@ -11,6 +10,7 @@
11#include "sway/input/cursor.h" 10#include "sway/input/cursor.h"
12#include "sway/input/input-manager.h" 11#include "sway/input/input-manager.h"
13#include "sway/output.h" 12#include "sway/output.h"
13#include "sway/server.h"
14#include "sway/tree/container.h" 14#include "sway/tree/container.h"
15#include "sway/tree/node.h" 15#include "sway/tree/node.h"
16#include "sway/tree/view.h" 16#include "sway/tree/view.h"
@@ -606,21 +606,15 @@ static void arrange_output(struct sway_output *output, int width, int height) {
606 } 606 }
607} 607}
608 608
609static void arrange_popup(struct wlr_scene_tree *popup) { 609void arrange_popups(struct wlr_scene_tree *popups) {
610 struct wlr_scene_node *node; 610 struct wlr_scene_node *node;
611 wl_list_for_each(node, &popup->children, link) { 611 wl_list_for_each(node, &popups->children, link) {
612 struct sway_xdg_popup *popup = scene_descriptor_try_get(node, 612 struct sway_popup_desc *popup = scene_descriptor_try_get(node,
613 SWAY_SCENE_DESC_POPUP); 613 SWAY_SCENE_DESC_POPUP);
614 614
615 // the popup layer may have popups from layer_shell surfaces, in this 615 int lx, ly;
616 // case those don't have a scene descriptor, so lets skip those here. 616 wlr_scene_node_coords(popup->relative, &lx, &ly);
617 if (popup) { 617 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 } 618 }
625} 619}
626 620
@@ -679,7 +673,7 @@ static void arrange_root(struct sway_root *root) {
679 } 673 }
680 } 674 }
681 675
682 arrange_popup(root->layers.popup); 676 arrange_popups(root->layers.popup);
683} 677}
684 678
685/** 679/**
@@ -768,7 +762,7 @@ static bool should_configure(struct sway_node *node,
768 } 762 }
769 struct sway_container_state *cstate = &node->sway_container->current; 763 struct sway_container_state *cstate = &node->sway_container->current;
770 struct sway_container_state *istate = &instruction->container_state; 764 struct sway_container_state *istate = &instruction->container_state;
771#if HAVE_XWAYLAND 765#if WLR_HAS_XWAYLAND
772 // Xwayland views are position-aware and need to be reconfigured 766 // Xwayland views are position-aware and need to be reconfigured
773 // when their position changes. 767 // when their position changes.
774 if (node->sway_container->view->type == SWAY_VIEW_XWAYLAND) { 768 if (node->sway_container->view->type == SWAY_VIEW_XWAYLAND) {