aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/tree/view.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index e8e8580a..40fe7b57 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -464,6 +464,9 @@ static void view_subsurface_create(struct sway_view *view,
464static void view_init_subsurfaces(struct sway_view *view, 464static void view_init_subsurfaces(struct sway_view *view,
465 struct wlr_surface *surface); 465 struct wlr_surface *surface);
466 466
467static void view_child_init_subsurfaces(struct sway_view_child *view_child,
468 struct wlr_surface *surface);
469
467static void view_handle_surface_new_subsurface(struct wl_listener *listener, 470static void view_handle_surface_new_subsurface(struct wl_listener *listener,
468 void *data) { 471 void *data) {
469 struct sway_view *view = 472 struct sway_view *view =
@@ -957,6 +960,14 @@ static void view_init_subsurfaces(struct sway_view *view,
957 } 960 }
958} 961}
959 962
963static void view_child_init_subsurfaces(struct sway_view_child *view_child,
964 struct wlr_surface *surface) {
965 struct wlr_subsurface *subsurface;
966 wl_list_for_each(subsurface, &surface->subsurfaces, parent_link) {
967 view_child_subsurface_create(view_child, subsurface);
968 }
969}
970
960static void view_child_handle_surface_map(struct wl_listener *listener, 971static void view_child_handle_surface_map(struct wl_listener *listener,
961 void *data) { 972 void *data) {
962 struct sway_view_child *child = 973 struct sway_view_child *child =
@@ -1012,7 +1023,7 @@ void view_child_init(struct sway_view_child *child,
1012 wlr_surface_send_enter(child->surface, workspace->output->wlr_output); 1023 wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
1013 } 1024 }
1014 1025
1015 view_init_subsurfaces(child->view, surface); 1026 view_child_init_subsurfaces(child, surface);
1016} 1027}
1017 1028
1018void view_child_destroy(struct sway_view_child *child) { 1029void view_child_destroy(struct sway_view_child *child) {