This commit is contained in:
Ronan Pigott 2021-10-23 10:09:12 +01:00 committed by GitHub
commit d09d566a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1070,6 +1070,11 @@ static void view_child_handle_surface_map(struct wl_listener *listener,
wl_container_of(listener, child, surface_map);
child->mapped = true;
view_child_damage(child, true);
struct sway_workspace *workspace = child->view->container->pending.workspace;
if (workspace) {
wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
}
}
static void view_child_handle_surface_unmap(struct wl_listener *listener,
@ -1114,11 +1119,6 @@ void view_child_init(struct sway_view_child *child,
wl_signal_add(&view->events.unmap, &child->view_unmap);
child->view_unmap.notify = view_child_handle_view_unmap;
struct sway_workspace *workspace = child->view->container->pending.workspace;
if (workspace) {
wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
}
view_child_init_subsurfaces(child, surface);
}