aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Alexander Orzechowski <alex@ozal.ski>2024-01-18 10:02:41 -0500
committerLibravatar Kirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit6e5fc4c2aafd211323c6037aa868c075852bfe15 (patch)
treebff87217414fa981d48244c5bc1b253817646783 /include
parentscene_graph: Port xdg_shell (diff)
downloadsway-6e5fc4c2aafd211323c6037aa868c075852bfe15.tar.gz
sway-6e5fc4c2aafd211323c6037aa868c075852bfe15.tar.zst
sway-6e5fc4c2aafd211323c6037aa868c075852bfe15.zip
scene_graph: Port xwayland
Diffstat (limited to 'include')
-rw-r--r--include/sway/output.h6
-rw-r--r--include/sway/scene_descriptor.h1
-rw-r--r--include/sway/tree/root.h7
-rw-r--r--include/sway/tree/view.h8
4 files changed, 9 insertions, 13 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index ea5d8f47..e2023306 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -141,12 +141,6 @@ void output_view_for_each_popup_surface(struct sway_output *output,
141 struct sway_view *view, sway_surface_iterator_func_t iterator, 141 struct sway_view *view, sway_surface_iterator_func_t iterator,
142 void *user_data); 142 void *user_data);
143 143
144#if HAVE_XWAYLAND
145void output_unmanaged_for_each_surface(struct sway_output *output,
146 struct wl_list *unmanaged, sway_surface_iterator_func_t iterator,
147 void *user_data);
148#endif
149
150void output_for_each_workspace(struct sway_output *output, 144void output_for_each_workspace(struct sway_output *output,
151 void (*f)(struct sway_workspace *ws, void *data), void *data); 145 void (*f)(struct sway_workspace *ws, void *data), void *data);
152 146
diff --git a/include/sway/scene_descriptor.h b/include/sway/scene_descriptor.h
index 43991f77..2649d7c2 100644
--- a/include/sway/scene_descriptor.h
+++ b/include/sway/scene_descriptor.h
@@ -16,6 +16,7 @@ enum sway_scene_descriptor_type {
16 SWAY_SCENE_DESC_CONTAINER, 16 SWAY_SCENE_DESC_CONTAINER,
17 SWAY_SCENE_DESC_VIEW, 17 SWAY_SCENE_DESC_VIEW,
18 SWAY_SCENE_DESC_LAYER_SHELL, 18 SWAY_SCENE_DESC_LAYER_SHELL,
19 SWAY_SCENE_DESC_XWAYLAND_UNMANAGED,
19 SWAY_SCENE_DESC_POPUP, 20 SWAY_SCENE_DESC_POPUP,
20 SWAY_SCENE_DESC_DRAG_ICON, 21 SWAY_SCENE_DESC_DRAG_ICON,
21}; 22};
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
index 2f717bae..15df0f55 100644
--- a/include/sway/tree/root.h
+++ b/include/sway/tree/root.h
@@ -47,16 +47,15 @@ struct sway_root {
47 struct wlr_scene_tree *shell_top; 47 struct wlr_scene_tree *shell_top;
48 struct wlr_scene_tree *fullscreen; 48 struct wlr_scene_tree *fullscreen;
49 struct wlr_scene_tree *fullscreen_global; 49 struct wlr_scene_tree *fullscreen_global;
50#if HAVE_XWAYLAND
51 struct wlr_scene_tree *unmanaged;
52#endif
50 struct wlr_scene_tree *shell_overlay; 53 struct wlr_scene_tree *shell_overlay;
51 struct wlr_scene_tree *popup; 54 struct wlr_scene_tree *popup;
52 struct wlr_scene_tree *seat; 55 struct wlr_scene_tree *seat;
53 struct wlr_scene_tree *session_lock; 56 struct wlr_scene_tree *session_lock;
54 } layers; 57 } layers;
55 58
56#if HAVE_XWAYLAND
57 struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link
58#endif
59
60 // Includes disabled outputs 59 // Includes disabled outputs
61 struct wl_list all_outputs; // sway_output::link 60 struct wl_list all_outputs; // sway_output::link
62 61
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 467d912f..8493958e 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -147,6 +147,8 @@ struct sway_xdg_shell_view {
147struct sway_xwayland_view { 147struct sway_xwayland_view {
148 struct sway_view view; 148 struct sway_view view;
149 149
150 struct wlr_scene_tree *surface_tree;
151
150 struct wl_listener commit; 152 struct wl_listener commit;
151 struct wl_listener request_move; 153 struct wl_listener request_move;
152 struct wl_listener request_resize; 154 struct wl_listener request_resize;
@@ -168,18 +170,18 @@ struct sway_xwayland_view {
168 struct wl_listener unmap; 170 struct wl_listener unmap;
169 struct wl_listener destroy; 171 struct wl_listener destroy;
170 struct wl_listener override_redirect; 172 struct wl_listener override_redirect;
173
174 struct wl_listener surface_tree_destroy;
171}; 175};
172 176
173struct sway_xwayland_unmanaged { 177struct sway_xwayland_unmanaged {
174 struct wlr_xwayland_surface *wlr_xwayland_surface; 178 struct wlr_xwayland_surface *wlr_xwayland_surface;
175 struct wl_list link;
176 179
177 int lx, ly; 180 struct wlr_scene_surface *surface_scene;
178 181
179 struct wl_listener request_activate; 182 struct wl_listener request_activate;
180 struct wl_listener request_configure; 183 struct wl_listener request_configure;
181 struct wl_listener request_fullscreen; 184 struct wl_listener request_fullscreen;
182 struct wl_listener commit;
183 struct wl_listener set_geometry; 185 struct wl_listener set_geometry;
184 struct wl_listener associate; 186 struct wl_listener associate;
185 struct wl_listener dissociate; 187 struct wl_listener dissociate;