diff options
author | adnano <me@adnano.co> | 2023-02-01 09:37:02 -0500 |
---|---|---|
committer | adnano <me@adnano.co> | 2023-02-01 09:37:02 -0500 |
commit | 5ed249e3f3505cdf8e1f50f6a3ad4f10d4746600 (patch) | |
tree | e140e4d240011d49dfc75f97835b8acc8aecd8c4 | |
parent | 5db5b3a7c7a342815226ad4262368577539e3df9 (diff) | |
download | wmenu-5ed249e3f3505cdf8e1f50f6a3ad4f10d4746600.tar.gz |
Fix buffer size not divisible by scale
-rw-r--r-- | main.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -394,6 +394,7 @@ void render_frame(struct menu_state *state) { cairo_set_source_surface(shm, recorder, 0, 0); cairo_paint(shm); + wl_surface_set_buffer_scale(state->surface, scale); wl_surface_attach(state->surface, state->current->buffer, 0, 0); wl_surface_damage(state->surface, 0, 0, state->width, state->height); wl_surface_commit(state->surface); @@ -410,8 +411,6 @@ static void surface_enter(void *data, struct wl_surface *surface, struct wl_output *wl_output) { struct menu_state *state = data; state->output = wl_output_get_user_data(wl_output); - wl_surface_set_buffer_scale(state->surface, state->output->scale); - wl_surface_commit(state->surface); render_frame(state); } |