Skip to content

Commit

Permalink
wayland: Don't render a frame on same-size configure
Browse files Browse the repository at this point in the history
Co-authored-by: lilydjwg <lilydjwg@gmail.com>
  • Loading branch information
2 people authored and emersion committed Jan 20, 2022
1 parent c55b314 commit aafbc91
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,19 @@ static void layer_surface_handle_configure(void *data,
uint32_t serial, uint32_t width, uint32_t height) {
struct mako_surface *msurface = data;

zwlr_layer_surface_v1_ack_configure(surface, serial);

if (msurface->configured &&
msurface->width == (int32_t) width &&
msurface->height == (int32_t) height) {
wl_surface_commit(msurface->surface);
return;
}

msurface->configured = true;
msurface->width = width;
msurface->height = height;

zwlr_layer_surface_v1_ack_configure(surface, serial);
send_frame(msurface);
}

Expand Down

0 comments on commit aafbc91

Please sign in to comment.