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 and AlanGriffiths committed Sep 9, 2024
1 parent 7e21a55 commit 0901953
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 0901953

Please sign in to comment.