-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OutputManager: When listeners are registered, they need to be notified of existing globals #3586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense to me.
However, this does seem like a minor paradigm shift with our listeners. For example, XdgOutputV1
is an OutputConfigListener
who listens on output_config_changed
. When we add the listener (in XdgOutputV1
's constructor), we don't automatically trigger the event for the listener, but rather allow the listener to manually trigger its own event.
It might be surprising that some listeners trigger events on listen, while others do not. But that's my 2c :)
I'm sure there are both other registrations that do this and other registrations that don't. I guess it depends on what is being notified - in this case, I don't see a downside. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
…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
In particular,
WindowWlSurfaceRole::output_global_created()
uses the notification to register as an observer on the global. Without this, it cannot track configuration changes