Skip to content

Commit

Permalink
More than one hidden output may be exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed May 28, 2024
1 parent a23d619 commit 59868aa
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/egfullscreenclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ void egmde::FullscreenClient::on_output_changed(Output const* output)
draw_screen(p->second, should_draw_crash());
}

check_for_exposed_output();
check_for_exposed_outputs();
}
wl_display_flush(display);
}

void egmde::FullscreenClient::check_for_exposed_output()
void egmde::FullscreenClient::check_for_exposed_outputs()
{
auto i = begin(hidden_outputs);
while (i != end(hidden_outputs))
Expand All @@ -282,15 +282,13 @@ void egmde::FullscreenClient::check_for_exposed_output()
{
display_area.add(screen_rect);
draw_screen(outputs.insert({*i, SurfaceInfo{*i}}).first->second, should_draw_crash());
hidden_outputs.erase(i);
break;
}

++i;
}

if (i != end(hidden_outputs))
{
hidden_outputs.erase(i);
else
{
++i;
}
}
}

Expand Down Expand Up @@ -321,7 +319,7 @@ void egmde::FullscreenClient::on_output_gone(Output const* output)
display_area.remove({{output->x, output->y}, {output->width, output->height}});
}

check_for_exposed_output();
check_for_exposed_outputs();
}
wl_display_flush(display);
}
Expand Down

0 comments on commit 59868aa

Please sign in to comment.