Only send OutputConfig sendApplied / sendFailed to the right resource
ClosedPublic

Authored by davidedmundson on Sep 20 2017, 8:31 PM.

Details

Summary

I don't understand the original logic.
s_allResources contains /every/ resource, not just outputconfigurations.

Sending org_kde_kwin_outputconfiguration_send_applied to a wl_surface (for example),
results in an error.

The reason kwin doesn't currently crash is because we don't actually send
applied/failed after setting outputs. (which is another bug)

Test Plan

The existing unit test still passes.

Diff Detail

Repository
R127 KWayland
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Sep 20 2017, 8:31 PM
Restricted Application added projects: Plasma on Wayland, Frameworks. · View Herald TranscriptSep 20 2017, 8:31 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
sebas accepted this revision.Sep 21 2017, 12:07 PM
sebas added a subscriber: sebas.

Yes, the initial idea was to send applied() to all connected resources. That is not s_allResources, so your patch is correct. The resources that are actually bound are not currently tracked.

This revision is now accepted and ready to land.Sep 21 2017, 12:07 PM

FWIW, I tested it, it fixes kwin crashing when adding a setApplied() call on the OutputConfiguration, and it also means the applied signal arrives.

This revision was automatically updated to reflect the committed changes.