aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2024-07-23 16:16:19 -0600
committerA Frederick Christensen <dwl@ivories.org>2024-07-24 07:03:57 -0500
commita9bcdff683226811f50602ed73d07d58fdb668d8 (patch)
treeb86560f09fd0f7fefa8dea10ef1c76ecf6968f2b
parentbd59573f07f27fff7870a1e1a70e72493bb42453 (diff)
send scale on initial commit to layer surfaces
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me> (cherry picked from commit cd216908a7c26f547b7e10a389aea6b754afb6d1)
-rw-r--r--dwl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 5bf995e..5f9491b 100644
--- a/dwl.c
+++ b/dwl.c
@@ -763,6 +763,9 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
struct wlr_layer_surface_v1_state old_state;
if (l->layer_surface->initial_commit) {
+ wlr_fractional_scale_v1_notify_scale(layer_surface->surface, l->mon->wlr_output->scale);
+ wlr_surface_set_preferred_buffer_scale(layer_surface->surface, (int32_t)ceilf(l->mon->wlr_output->scale));
+
/* Temporarily set the layer's current state to pending
* so that we can easily arrange it */
old_state = l->layer_surface->current;
@@ -945,8 +948,6 @@ createlayersurface(struct wl_listener *listener, void *data)
wl_list_insert(&l->mon->layers[layer_surface->pending.layer],&l->link);
wlr_surface_send_enter(surface, layer_surface->output);
- wlr_fractional_scale_v1_notify_scale(surface, l->mon->wlr_output->scale);
- wlr_surface_set_preferred_buffer_scale(surface, (int32_t)ceilf(l->mon->wlr_output->scale));
}
void