diff options
author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-05 00:42:43 -0600 |
---|---|---|
committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-25 11:33:49 -0600 |
commit | 46ae075430017ccd4a58d63a166fe1e696d3f379 (patch) | |
tree | 7a817787d26c05e12aa11c09b48162f6677bb5ff | |
parent | 13925eb1da8af2c1d23ee9d01efd03c3626081b2 (diff) |
set preferred scale on creation (LayerShell)
-rw-r--r-- | dwl.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -71,6 +71,7 @@ #define MAX(A, B) ((A) > (B) ? (A) : (B)) #define MIN(A, B) ((A) < (B) ? (A) : (B)) #define ROUND(X) ((int)((X < 0) ? (X - 0.5) : (X + 0.5))) +#define CEIL(X) ((int)((X < 0) ? (X) : ((int)X == X) ? (X) : ((int)X + 1))) #define CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS) #define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags])) #define LENGTH(X) (sizeof X / sizeof X[0]) @@ -884,6 +885,8 @@ 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, CEIL(l->mon->wlr_output->scale)); /* Temporarily set the layer's current state to pending * so that we can easily arrange it |