mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
set preferred scale on creation (LayerShell)
This commit is contained in:
parent
13925eb1da
commit
46ae075430
1 changed files with 3 additions and 0 deletions
3
dwl.c
3
dwl.c
|
@ -71,6 +71,7 @@
|
||||||
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||||||
#define MIN(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 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 CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS)
|
||||||
#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags]))
|
#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags]))
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
#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);
|
wl_list_insert(&l->mon->layers[layer_surface->pending.layer],&l->link);
|
||||||
wlr_surface_send_enter(surface, layer_surface->output);
|
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
|
/* Temporarily set the layer's current state to pending
|
||||||
* so that we can easily arrange it
|
* so that we can easily arrange it
|
||||||
|
|
Loading…
Reference in a new issue