aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 23:41:33 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 23:41:33 -0400
commitdc8c9fbeb664518c76066cc28ee29452c6c30128 (patch)
tree88c2de0d08e00b2a30cb20cdfadfa6e53f5c59b4 /sway/desktop/xwayland.c
parentMerge pull request #1653 from swaywm/revert-1647-refactor-tree (diff)
downloadsway-dc8c9fbeb664518c76066cc28ee29452c6c30128.tar.gz
sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.tar.zst
sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.zip
Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
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 f9b5242b..fd0bcaca 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -5,10 +5,10 @@
5#include <wlr/xwayland.h> 5#include <wlr/xwayland.h>
6#include <wlr/types/wlr_output_layout.h> 6#include <wlr/types/wlr_output_layout.h>
7#include <wlr/types/wlr_output.h> 7#include <wlr/types/wlr_output.h>
8#include "sway/container.h" 8#include "sway/tree/container.h"
9#include "sway/layout.h" 9#include "sway/tree/layout.h"
10#include "sway/server.h" 10#include "sway/server.h"
11#include "sway/view.h" 11#include "sway/tree/view.h"
12#include "sway/output.h" 12#include "sway/output.h"
13#include "sway/input/seat.h" 13#include "sway/input/seat.h"
14#include "sway/input/input-manager.h" 14#include "sway/input/input-manager.h"
@@ -49,11 +49,11 @@ static void set_position(struct sway_view *view, double ox, double oy) {
49 if (!assert_xwayland(view)) { 49 if (!assert_xwayland(view)) {
50 return; 50 return;
51 } 51 }
52 swayc_t *output = swayc_parent_by_type(view->swayc, C_OUTPUT); 52 struct sway_container *output = container_parent(view->swayc, C_OUTPUT);
53 if (!sway_assert(output, "view must be within tree to set position")) { 53 if (!sway_assert(output, "view must be within tree to set position")) {
54 return; 54 return;
55 } 55 }
56 swayc_t *root = swayc_parent_by_type(output, C_ROOT); 56 struct sway_container *root = container_parent(output, C_ROOT);
57 if (!sway_assert(root, "output must be within tree to set position")) { 57 if (!sway_assert(root, "output must be within tree to set position")) {
58 return; 58 return;
59 } 59 }
@@ -114,7 +114,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
114 } 114 }
115 } 115 }
116 116
117 swayc_t *parent = destroy_view(sway_surface->view->swayc); 117 struct sway_container *parent = container_view_destroy(sway_surface->view->swayc);
118 if (parent) { 118 if (parent) {
119 arrange_windows(parent, -1, -1); 119 arrange_windows(parent, -1, -1);
120 } 120 }
@@ -132,7 +132,7 @@ static void handle_unmap_notify(struct wl_listener *listener, void *data) {
132 } 132 }
133 133
134 // take it out of the tree 134 // take it out of the tree
135 swayc_t *parent = destroy_view(sway_surface->view->swayc); 135 struct sway_container *parent = container_view_destroy(sway_surface->view->swayc);
136 if (parent) { 136 if (parent) {
137 arrange_windows(parent, -1, -1); 137 arrange_windows(parent, -1, -1);
138 } 138 }
@@ -155,12 +155,12 @@ static void handle_map_notify(struct wl_listener *listener, void *data) {
155 &sway_surface->view->unmanaged_view_link); 155 &sway_surface->view->unmanaged_view_link);
156 } else { 156 } else {
157 struct sway_view *view = sway_surface->view; 157 struct sway_view *view = sway_surface->view;
158 destroy_view(view->swayc); 158 container_view_destroy(view->swayc);
159 159
160 swayc_t *parent = root_container.children->items[0]; 160 struct sway_container *parent = root_container.children->items[0];
161 parent = parent->children->items[0]; // workspace 161 parent = parent->children->items[0]; // workspace
162 162
163 swayc_t *cont = new_view(parent, view); 163 struct sway_container *cont = container_view_create(parent, view);
164 view->swayc = cont; 164 view->swayc = cont;
165 165
166 arrange_windows(cont->parent, -1, -1); 166 arrange_windows(cont->parent, -1, -1);
@@ -238,8 +238,8 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
238 } 238 }
239 239
240 struct sway_seat *seat = input_manager_current_seat(input_manager); 240 struct sway_seat *seat = input_manager_current_seat(input_manager);
241 swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container); 241 struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container);
242 swayc_t *cont = new_view(focus, sway_view); 242 struct sway_container *cont = container_view_create(focus, sway_view);
243 sway_view->swayc = cont; 243 sway_view->swayc = cont;
244 244
245 arrange_windows(cont->parent, -1, -1); 245 arrange_windows(cont->parent, -1, -1);