handle screen resize and redraw in layer_surface_configure

This commit is contained in:
mojyack 2023-10-30 01:13:23 +09:00 committed by Maarten van Gompel
parent aa9e8ab7ab
commit a126945401

13
main.c
View File

@ -352,6 +352,8 @@ wl_surface_enter(void *data, struct wl_surface *wl_surface,
keyboard.preferred_scale = current_output->scale;
flip_landscape();
kbd_resize(&keyboard, layouts, NumLayouts);
drwsurf_flip(&draw_surf);
}
static void
@ -488,9 +490,6 @@ static void
xdg_popup_configure(void *data, struct xdg_popup *xdg_popup, int32_t x,
int32_t y, int32_t width, int32_t height)
{
kbd_resize(&keyboard, layouts, NumLayouts);
drwsurf_flip(&draw_surf);
}
static void
@ -602,9 +601,13 @@ layer_surface_configure(void *data, struct zwlr_layer_surface_v1 *surface,
}
wl_surface_commit(popup_draw_surf.surf);
}
zwlr_layer_surface_v1_ack_configure(surface, serial);
zwlr_layer_surface_v1_ack_configure(surface, serial);
kbd_resize(&keyboard, layouts, NumLayouts);
drwsurf_flip(&draw_surf);
} else {
zwlr_layer_surface_v1_ack_configure(surface, serial);
}
}
void