diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2024-01-18 10:04:26 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-18 18:36:54 +0300 |
commit | 9a579666068d62b9354a39941e1ac8c1f4a58093 (patch) | |
tree | 79d5d36f27b43f1d68969242211a0e01395c6bfc /sway/desktop | |
parent | 0639bde9fb5637fbe63c65bfe85660745f159b96 (diff) |
scene_graph: Port ext_session_v1
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 4 | ||||
-rw-r--r-- | sway/desktop/render.c | 39 |
2 files changed, 4 insertions, 39 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 321e2a72..1e4474ce 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -798,6 +798,10 @@ void handle_new_output(struct wl_listener *listener, void *data) { output->repaint_timer = wl_event_loop_add_timer(server->wl_event_loop, output_repaint_timer_handler, output); + if (server->session_lock.lock) { + sway_session_lock_add_output(server->session_lock.lock, output); + } + struct output_config *oc = find_output_config(output); apply_output_config(oc, output); free_output_config(oc); diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 735dddb8..60431d79 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -1012,43 +1012,6 @@ void output_render(struct render_context *ctx) { pixman_region32_copy(&transformed_damage, damage); transform_output_damage(&transformed_damage, wlr_output); - if (server.session_lock.locked) { - struct wlr_render_color clear_color = { - .a = 1.0f - }; - if (server.session_lock.lock == NULL) { - // abandoned lock -> red BG - clear_color.r = 1.f; - } - - wlr_render_pass_add_rect(ctx->pass, &(struct wlr_render_rect_options){ - .box = { .width = wlr_output->width, .height = wlr_output->height }, - .color = clear_color, - .clip = &transformed_damage, - }); - - if (server.session_lock.lock != NULL) { - struct render_data data = { - .alpha = 1.0f, - .ctx = ctx, - }; - - struct wlr_session_lock_surface_v1 *lock_surface; - wl_list_for_each(lock_surface, &server.session_lock.lock->surfaces, link) { - if (lock_surface->output != wlr_output) { - continue; - } - if (!lock_surface->surface->mapped) { - continue; - } - - output_surface_for_each_surface(output, lock_surface->surface, - 0.0, 0.0, render_surface_iterator, &data); - } - } - goto renderer_end; - } - if (output_has_opaque_overlay_layer_surface(output)) { goto render_overlay; } @@ -1122,8 +1085,6 @@ render_overlay: &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); render_layer_popups(ctx, &output->shell_layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY]); - -renderer_end: pixman_region32_fini(&transformed_damage); wlr_output_add_software_cursors_to_render_pass(wlr_output, ctx->pass, damage); } |