aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index fd0bcaca..f9b5242b 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -5,10 +5,10 @@
#include <wlr/xwayland.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h>
-#include "sway/tree/container.h"
-#include "sway/tree/layout.h"
+#include "sway/container.h"
+#include "sway/layout.h"
#include "sway/server.h"
-#include "sway/tree/view.h"
+#include "sway/view.h"
#include "sway/output.h"
#include "sway/input/seat.h"
#include "sway/input/input-manager.h"
@@ -49,11 +49,11 @@ static void set_position(struct sway_view *view, double ox, double oy) {
if (!assert_xwayland(view)) {
return;
}
- struct sway_container *output = container_parent(view->swayc, C_OUTPUT);
+ swayc_t *output = swayc_parent_by_type(view->swayc, C_OUTPUT);
if (!sway_assert(output, "view must be within tree to set position")) {
return;
}
- struct sway_container *root = container_parent(output, C_ROOT);
+ swayc_t *root = swayc_parent_by_type(output, C_ROOT);
if (!sway_assert(root, "output must be within tree to set position")) {
return;
}
@@ -114,7 +114,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
}
}
- struct sway_container *parent = container_view_destroy(sway_surface->view->swayc);
+ swayc_t *parent = destroy_view(sway_surface->view->swayc);
if (parent) {
arrange_windows(parent, -1, -1);
}
@@ -132,7 +132,7 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) {
}
// take it out of the tree
- struct sway_container *parent = container_view_destroy(sway_surface->view->swayc);
+ swayc_t *parent = destroy_view(sway_surface->view->swayc);
if (parent) {
arrange_windows(parent, -1, -1);
}
@@ -155,12 +155,12 @@ static void handle_map_notify(struct wl_listener *listener, void *data) {
&sway_surface->view->unmanaged_view_link);
} else {
struct sway_view *view = sway_surface->view;
- container_view_destroy(view->swayc);
+ destroy_view(view->swayc);
- struct sway_container *parent = root_container.children->items[0];
+ swayc_t *parent = root_container.children->items[0];
parent = parent->children->items[0]; // workspace
- struct sway_container *cont = container_view_create(parent, view);
+ swayc_t *cont = new_view(parent, view);
view->swayc = cont;
arrange_windows(cont->parent, -1, -1);
@@ -238,8 +238,8 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
}
struct sway_seat *seat = input_manager_current_seat(input_manager);
- struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container);
- struct sway_container *cont = container_view_create(focus, sway_view);
+ swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container);
+ swayc_t *cont = new_view(focus, sway_view);
sway_view->swayc = cont;
arrange_windows(cont->parent, -1, -1);