[xdgoutput] Only send initial name and description if set
ClosedPublic

Authored by davidedmundson on Mar 24 2020, 4:32 PM.

Details

Summary

We hit this if we run an old kwin against new kwayland.

Kwin won't set the name so it's empty, so we'll call
zxdg_output_v1_send_name with an empty string

QtWayland will see that we receive this and update mOutputName to an
empty string which causes client issues.

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.Mar 24 2020, 4:32 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 24 2020, 4:32 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Mar 24 2020, 4:32 PM
zzag accepted this revision.Mar 24 2020, 4:34 PM
This revision is now accepted and ready to land.Mar 24 2020, 4:34 PM
apol accepted this revision.Mar 24 2020, 4:34 PM
This revision was automatically updated to reflect the committed changes.
zzag added a comment.Mar 24 2020, 4:40 PM

The spec says that name and description events will be sent after the xdg-output is created. I believe it might be a problem. We should remove these ifs in KF 5.70.

I interpreted the spec the same way when I wrote this...but we don't have a choice.

I believe it might be a problem

From a QtWayland POV it's fine at least.

We should remove these ifs in KF 5.70.

Why then?

Removing them then would still break Plasma 5.18 and officially we support that combo

Plasma 5.19 will set the name/description, so removing the if won't change anything.

zzag added a comment.Mar 24 2020, 5:27 PM

I interpreted the spec the same way when I wrote this...but we don't have a choice.

I think we do.

(a) Revert the recent xdg-output patches and land them in KF 5.70 or later. (Plasma 5.19 is going to depend on KF 5.70)

(b) Introduce an API to indicate what version of the protocol is actually implemented by the compositor.

m_xdgOutputManager = m_display->createXdgOutputManager(m_display);
m_xdgOutputManager->setVersion(XdgOutputManagerV1Interface::V2);
m_xdgOutputManager->create();

I think it's okay to ship the current fix, but only temporarily.

I believe it might be a problem

From a QtWayland POV it's fine at least.

We should remove these ifs in KF 5.70.

Why then?

Removing them then would still break Plasma 5.18 and officially we support that combo

Plasma 5.19 will set the name/description, so removing the if won't change anything.

davidedmundson added a comment.EditedMar 24 2020, 5:35 PM

(a) Revert the recent xdg-output patches and land them in KF 5.70 or later. (Plasma 5.19 is going to depend on KF 5.70)

I don't see how that fixes anything, as Plasma 5.18 should still be support by both KF5.69 and 5.70