Skip to content

Wayland code uses roundtrips incorrectly #449

@mahkoh

Description

@mahkoh

This code assumes that a configure event has arrived after a roundtrip:

zwlr_layer_surface_v1_set_size(window->layer_surface, 0, 32);
wl_surface_commit(surface);
wl_display_roundtrip(display);
zwlr_layer_surface_v1_set_size(window->layer_surface, get_window_width(window), 32);

However, the compositor might delay sending a configure event for various reasons. That causes window->width to be overwritten by the previous value.

Any of the existing code using roundtrips is suspicious.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions