commit 14f212406343365f278078f6bef338989aed24d9
parent 60e77eb6d3d2779cb51f5c11a19ff9673fec1220
Author: deurzen <max@deurzen.net>
Date: Wed, 1 Jun 2022 08:40:02 +0200
relocates layer shell initial arrangement code
Diffstat:
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/kranewl/server.cc b/src/kranewl/server.cc
@@ -434,6 +434,12 @@ Server::handle_new_layer_shell_surface(struct wl_listener* listener, void* data)
layer_surface->surface
);
layer->mp_scene->data = layer;
+
+ server->mp_model->register_layer(layer);
+ struct wlr_layer_surface_v1_state initial_state = layer->mp_layer_surface->current;
+ layer->mp_layer_surface->current = layer->mp_layer_surface->pending;
+ layer->mp_output->arrange_layers();
+ layer->mp_layer_surface->current = initial_state;
}
void
diff --git a/src/kranewl/tree/layer.cc b/src/kranewl/tree/layer.cc
@@ -98,13 +98,6 @@ Layer::handle_map(struct wl_listener* listener, void*)
layer->m_pid = layer->pid();
layer->format_uid();
- layer->mp_model->register_layer(layer);
-
- struct wlr_layer_surface_v1_state initial_state = layer->mp_layer_surface->current;
- layer->mp_layer_surface->current = layer->mp_layer_surface->pending;
- layer->mp_output->arrange_layers();
- layer->mp_layer_surface->current = initial_state;
-
wlr_surface_send_enter(
layer->mp_layer_surface->surface,
layer->mp_layer_surface->output