Skip to content

Commit

Permalink
Merge pull request swaywm#74 from quantum5/duplicate-configure
Browse files Browse the repository at this point in the history
Correctly handle multiple configure on wlr_layer_surface
  • Loading branch information
mortie committed Oct 10, 2021
2 parents 3f0c561 + 00a4275 commit eeb53eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/swaylock.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ struct swaylock_surface {
struct pool_buffer *current_buffer;
struct swaylock_fade fade;
int events_pending;
bool configured;
bool frame_pending, dirty;
uint32_t width, height;
uint32_t indicator_width, indicator_height;
Expand Down
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,10 @@ static void layer_surface_configure(void *data,
surface->indicator_height = 1;
zwlr_layer_surface_v1_ack_configure(layer_surface, serial);

if (--surface->events_pending == 0) {
if (!surface->configured && --surface->events_pending == 0) {
initially_render_surface(surface);
}
surface->configured = true;
}

static void layer_surface_closed(void *data,
Expand Down

0 comments on commit eeb53eb

Please sign in to comment.