Fix buffer size not divisible by scale - wmenu - 🔧 fork of wmenu
 (HTM) git clone git@git.drkhsh.at/wmenu.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 5ed249e3f3505cdf8e1f50f6a3ad4f10d4746600
 (DIR) parent 5db5b3a7c7a342815226ad4262368577539e3df9
 (HTM) Author: adnano <me@adnano.co>
       Date:   Wed,  1 Feb 2023 09:37:02 -0500
       
       Fix buffer size not divisible by scale
       
       Diffstat:
         M main.c                              |       3 +--
       
       1 file changed, 1 insertion(+), 2 deletions(-)
       ---
 (DIR) diff --git a/main.c b/main.c
       @@ -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);
        }