aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index bd53a5c8..1318f5fb 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1114,9 +1114,12 @@ void view_child_init(struct sway_view_child *child,
1114 wl_signal_add(&view->events.unmap, &child->view_unmap); 1114 wl_signal_add(&view->events.unmap, &child->view_unmap);
1115 child->view_unmap.notify = view_child_handle_view_unmap; 1115 child->view_unmap.notify = view_child_handle_view_unmap;
1116 1116
1117 struct sway_workspace *workspace = child->view->container->pending.workspace; 1117 struct sway_container *container = child->view->container;
1118 if (workspace) { 1118 if (container != NULL) {
1119 wlr_surface_send_enter(child->surface, workspace->output->wlr_output); 1119 struct sway_workspace *workspace = container->pending.workspace;
1120 if (workspace) {
1121 wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
1122 }
1120 } 1123 }
1121 1124
1122 view_child_init_subsurfaces(child, surface); 1125 view_child_init_subsurfaces(child, surface);