Skip to content

Commit

Permalink
OutputManager: When listeners are registered, they need to be notifie…
Browse files Browse the repository at this point in the history
…d of existing globals (#3586)

In particular, `WindowWlSurfaceRole::output_global_created()` uses the
notification to register as an observer on the global. Without this, it
cannot track configuration changes
  • Loading branch information
hbatagelo authored Sep 5, 2024
2 parents b7436aa + 7661001 commit 18d3daa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server/frontend_wayland/output_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ auto mf::OutputManager::output_for(graphics::DisplayConfigurationOutputId id) ->
void mf::OutputManager::add_listener(OutputManagerListener* listener)
{
listeners.push_back(listener);

for (auto const& [_, output_global] : outputs)
{
listener->output_global_created(output_global.get());
}
}

void mf::OutputManager::remove_listener(OutputManagerListener* listener)
Expand Down

0 comments on commit 18d3daa

Please sign in to comment.