Wayland: when blocking remember latest config change instead of crashing
ClosedPublic

Authored by romangg on Apr 25 2018, 1:33 PM.

Details

Summary

Configuration change requests by clients while the Wayland server is
processing a change lead to a failing assert in blockSignals().

Instead in such a situation remember the latest configuration change request
and apply it after the current change has been processed.

Test Plan

Auto test exposing the problem. Also manually with my output color correction
code.

Diff Detail

Repository
R110 KScreen Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Apr 25 2018, 1:33 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 25 2018, 1:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
romangg requested review of this revision.Apr 25 2018, 1:33 PM
apol added a subscriber: apol.Apr 26 2018, 9:50 AM
apol added inline comments.
tests/kwayland/waylandtestserver.cpp
156

maybe it's a bit easier to understand if you add an else instead of a return?

161

Won't the using code expect configChanged to be emitted after configReceived?

davidedmundson accepted this revision.Jul 3 2018, 5:45 PM
This revision is now accepted and ready to land.Jul 3 2018, 5:45 PM
romangg added inline comments.Jul 4 2018, 6:32 AM
tests/kwayland/waylandtestserver.cpp
156

The coding style recommendation in general is to return as early as possible instead of using else.

161

In testApplyOnPending it waits on configReceived and then on configChanged.

This revision was automatically updated to reflect the committed changes.