Skip to content

Need a regression test for layer shell surfaces submitting buffers while hidden #4702

@tarek-y-ismail

Description

@tarek-y-ismail

While working on #4664, I encountered a bug which can be reproduced with the following steps:

  1. Run a layer shell surface in the "above" layer (waybar, ironbar, gbar)
  2. Run a normal application
  3. Fullscreen the normal application
  4. Wait for some time
  5. As the layer shell surface submits a new buffer, it will be shown in the middle of the screen vertically.

I've tried implementing this as a WLCS test in canonical/wlcs#405, but it does not fit in WLCS as different compositors will likely? treat this differently (if not, I'll happily reopen the PR).

I could not find a part of our testing infrastructure that allows for testing this. For example, window management tests do not exercise the path that triggers this bug:

bool const is_mapped = scene_surface->visible();
bool const should_be_mapped = static_cast<bool>(surface.value().buffer_size());
if (!is_mapped && should_be_mapped && scene_surface->state() == mir_window_state_hidden)
{
spec().state = mir_window_state_restored;
}
else if (is_mapped && !should_be_mapped)
{
spec().state = mir_window_state_hidden;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions