mirror of
https://codeberg.org/vyivel/dulcepan/
synced 2025-12-17 23:55:12 +02:00
output: ignore configures before initial commit
This commit is contained in:
@@ -49,6 +49,7 @@ struct dp_output {
|
||||
bool needs_redraw;
|
||||
|
||||
struct zwlr_screencopy_frame_v1 *frame;
|
||||
bool has_frame;
|
||||
// XXX: this is completely untested
|
||||
bool y_invert;
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ static void layer_surface_handle_configure(void *data, struct zwlr_layer_surface
|
||||
uint32_t serial, uint32_t width, uint32_t height) {
|
||||
struct dp_output *output = data;
|
||||
|
||||
if (!output->has_frame) {
|
||||
// Ignore configures that came too early
|
||||
return;
|
||||
}
|
||||
|
||||
// Thanks layer-shell
|
||||
int i_width = (int)width, i_height = (int)height;
|
||||
|
||||
@@ -91,6 +96,8 @@ static void frame_handle_ready(void *data, struct zwlr_screencopy_frame_v1 *fram
|
||||
zwlr_screencopy_frame_v1_destroy(output->frame);
|
||||
output->frame = NULL;
|
||||
|
||||
output->has_frame = true;
|
||||
|
||||
wl_surface_commit(output->main_surface);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user