aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/layer_shell.c2
-rw-r--r--sway/desktop/output.c20
-rw-r--r--sway/desktop/wl_shell.c12
-rw-r--r--sway/desktop/xdg_shell_v6.c12
-rw-r--r--sway/desktop/xwayland.c24
5 files changed, 35 insertions, 35 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index bd62f84a..137b3260 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -7,7 +7,7 @@
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
#include "sway/layers.h"
-#include "sway/layout.h"
+#include "sway/tree/layout.h"
#include "sway/output.h"
#include "sway/server.h"
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index b8253ace..1273df59 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -11,14 +11,14 @@
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_wl_shell.h>
#include "log.h"
-#include "sway/container.h"
+#include "sway/tree/container.h"
#include "sway/input/input-manager.h"
#include "sway/input/seat.h"
#include "sway/layers.h"
-#include "sway/layout.h"
+#include "sway/tree/layout.h"
#include "sway/output.h"
#include "sway/server.h"
-#include "sway/view.h"
+#include "sway/tree/view.h"
/**
* Rotate a child's position relative to a parent. The parent size is (pw, ph),
@@ -145,7 +145,7 @@ struct render_data {
struct timespec *now;
};
-static void output_frame_view(swayc_t *view, void *data) {
+static void output_frame_view(struct sway_container *view, void *data) {
struct render_data *rdata = data;
struct sway_output *output = rdata->output;
struct timespec *now = rdata->now;
@@ -219,16 +219,16 @@ static void output_frame_notify(struct wl_listener *listener, void *data) {
&soutput->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
struct sway_seat *seat = input_manager_current_seat(input_manager);
- swayc_t *focus = sway_seat_get_focus_inactive(seat, soutput->swayc);
- swayc_t *workspace = (focus->type == C_WORKSPACE ?
+ struct sway_container *focus = sway_seat_get_focus_inactive(seat, soutput->swayc);
+ struct sway_container *workspace = (focus->type == C_WORKSPACE ?
focus :
- swayc_parent_by_type(focus, C_WORKSPACE));
+ container_parent(focus, C_WORKSPACE));
struct render_data rdata = {
.output = soutput,
.now = &now,
};
- swayc_descendants_of_type(workspace, C_VIEW, output_frame_view, &rdata);
+ container_descendants(workspace, C_VIEW, output_frame_view, &rdata);
// render unmanaged views on top
struct sway_view *view;
@@ -259,7 +259,7 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) {
struct wlr_output *wlr_output = data;
wlr_log(L_DEBUG, "Output %p %s removed", wlr_output, wlr_output->name);
- destroy_output(output->swayc);
+ container_output_destroy(output->swayc);
}
static void handle_output_mode(struct wl_listener *listener, void *data) {
@@ -287,7 +287,7 @@ void handle_new_output(struct wl_listener *listener, void *data) {
wlr_output_set_mode(wlr_output, mode);
}
- output->swayc = new_output(output);
+ output->swayc = container_output_create(output);
if (!output->swayc) {
free(output);
return;
diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c
index 0356aa81..4d4d1ed7 100644
--- a/sway/desktop/wl_shell.c
+++ b/sway/desktop/wl_shell.c
@@ -3,10 +3,10 @@
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/types/wlr_wl_shell.h>
-#include "sway/container.h"
-#include "sway/layout.h"
+#include "sway/tree/container.h"
+#include "sway/tree/layout.h"
#include "sway/server.h"
-#include "sway/view.h"
+#include "sway/tree/view.h"
#include "sway/input/seat.h"
#include "sway/input/input-manager.h"
#include "log.h"
@@ -74,7 +74,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
wl_container_of(listener, sway_surface, destroy);
wl_list_remove(&sway_surface->commit.link);
wl_list_remove(&sway_surface->destroy.link);
- swayc_t *parent = destroy_view(sway_surface->view->swayc);
+ struct sway_container *parent = container_view_destroy(sway_surface->view->swayc);
free(sway_surface->view);
free(sway_surface);
arrange_windows(parent, -1, -1);
@@ -132,8 +132,8 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
wl_signal_add(&shell_surface->events.destroy, &sway_surface->destroy);
struct sway_seat *seat = input_manager_current_seat(input_manager);
- swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container);
- swayc_t *cont = new_view(focus, sway_view);
+ struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container);
+ struct sway_container *cont = container_view_create(focus, sway_view);
sway_view->swayc = cont;
arrange_windows(cont->parent, -1, -1);
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index 18e7d399..25c0cbca 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -3,10 +3,10 @@
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
-#include "sway/container.h"
-#include "sway/layout.h"
+#include "sway/tree/container.h"
+#include "sway/tree/layout.h"
#include "sway/server.h"
-#include "sway/view.h"
+#include "sway/tree/view.h"
#include "sway/input/seat.h"
#include "sway/input/input-manager.h"
#include "log.h"
@@ -83,7 +83,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
wl_container_of(listener, sway_xdg_surface, destroy);
wl_list_remove(&sway_xdg_surface->commit.link);
wl_list_remove(&sway_xdg_surface->destroy.link);
- swayc_t *parent = destroy_view(sway_xdg_surface->view->swayc);
+ struct sway_container *parent = container_view_destroy(sway_xdg_surface->view->swayc);
free(sway_xdg_surface->view);
free(sway_xdg_surface);
arrange_windows(parent, -1, -1);
@@ -137,8 +137,8 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
wl_signal_add(&xdg_surface->events.destroy, &sway_surface->destroy);
struct sway_seat *seat = input_manager_current_seat(input_manager);
- swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container);
- swayc_t *cont = new_view(focus, sway_view);
+ struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container);
+ struct sway_container *cont = container_view_create(focus, sway_view);
sway_view->swayc = cont;
arrange_windows(cont->parent, -1, -1);
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index f9b5242b..fd0bcaca 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/container.h"
-#include "sway/layout.h"
+#include "sway/tree/container.h"
+#include "sway/tree/layout.h"
#include "sway/server.h"
-#include "sway/view.h"
+#include "sway/tree/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;
}
- swayc_t *output = swayc_parent_by_type(view->swayc, C_OUTPUT);
+ struct sway_container *output = container_parent(view->swayc, C_OUTPUT);
if (!sway_assert(output, "view must be within tree to set position")) {
return;
}
- swayc_t *root = swayc_parent_by_type(output, C_ROOT);
+ struct sway_container *root = container_parent(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) {
}
}
- swayc_t *parent = destroy_view(sway_surface->view->swayc);
+ struct sway_container *parent = container_view_destroy(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
- swayc_t *parent = destroy_view(sway_surface->view->swayc);
+ struct sway_container *parent = container_view_destroy(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;
- destroy_view(view->swayc);
+ container_view_destroy(view->swayc);
- swayc_t *parent = root_container.children->items[0];
+ struct sway_container *parent = root_container.children->items[0];
parent = parent->children->items[0]; // workspace
- swayc_t *cont = new_view(parent, view);
+ struct sway_container *cont = container_view_create(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);
- swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container);
- swayc_t *cont = new_view(focus, sway_view);
+ struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container);
+ struct sway_container *cont = container_view_create(focus, sway_view);
sway_view->swayc = cont;
arrange_windows(cont->parent, -1, -1);